Raised This Month: $ Target: $400
 0% 

Round End & Restart Events


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-11-2008 , 10:48   Round End & Restart Events
Reply With Quote #1

hi i got when the event calls restart or round end it call one same event but 2 times i need only one
PHP Code:
    register_logevent("eRandromize"2"1=Round_End")
    
register_event("TextMsg""eRandromize""a""2&#Game_C""2&#Game_w"
possible to do it in one line?
__________________
xPaw is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-11-2008 , 11:26   Re: Round End & Restart Events
Reply With Quote #2

My understanding was that RestartRound and RoundEnd were being called at the same time, which executed your plugin's RoundEnd funtion twice?
If so, use this:

Code:
new bool:g_handle_round_end; public plugin_init() {   register_event("HLTV", "EventNewRound", "a", "1=0", "2=0");   register_event("TextMsg", "EventRoundEnd", "a", "2&#Game_C", "2&#Game_w");   register_logevent("EventRoundEnd", 2, "1=Round_End"); } public EventNewRound() {   g_handle_round_end = true; } public EventRoundEnd() {   if( !g_handle_round_end ) return;     g_handle_round_end = false;     // add your round end code here }

If this is not the case, please explain again
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 09-11-2008 at 11:40.
Exolent[jNr] is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-11-2008 , 11:36   Re: Round End & Restart Events
Reply With Quote #3

i just want when rr or roundend it call one function named eRandromise, not for example
rr - event_restart
round end - event_roundend

becuz when i use in event rr and round end same function

its being called 2 times when i restartround
__________________
xPaw is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-11-2008 , 11:39   Re: Round End & Restart Events
Reply With Quote #4

That's what mine does, if you would read and understand the code.

EDIT: I just simplified the code.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-11-2008 , 11:43   Re: Round End & Restart Events
Reply With Quote #5

okay thanks, but possible do like

PHP Code:
register_event("TextMsg""EventRoundEndOrRestart""a""2&#Game_C""2&#Game_w""2&#Cstrike_TitlesTXT_CTs_Win""2&#Cstrike_TitlesTXT_Terrorists_Win""2&#Cstrike_TitlesTXT_Round_Draw"); 
i know looks like...
__________________
xPaw is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-11-2008 , 11:45   Re: Round End & Restart Events
Reply With Quote #6

Why don't you use the Message Logging plugin by DamagedSoul, and then find if there are TextMsg events when the round ends.
Then, you can take those and register the event and try it out yourself.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-11-2008 , 12:07   Re: Round End & Restart Events
Reply With Quote #7

Quote:
Message Logging plugin by DamagedSoul
cant find
__________________
xPaw is offline
fxfighter
Veteran Member
Join Date: Feb 2007
Location: Trollhättan
Old 09-11-2008 , 12:50   Re: Round End & Restart Events
Reply With Quote #8

here
__________________
If one of my plugins become broken, contact me by mail. [email protected]
fxfighter is offline
Send a message via MSN to fxfighter
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 03:13.


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