Raised This Month: $ Target: $400
 0% 

Round Not Finish


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 03-07-2014 , 20:56   Round Not Finish
Reply With Quote #1

i have a problem, when the time of round is 0 the round not finish, only if a team is killed or game-comencing, etc.

PHP Code:
public message_textmsg()
{
    static 
textmsg[22]
    
get_msg_arg_string(2textmsgcharsmax(textmsg))
    
    if (
equal(textmsg"#Game_will_restart_in"))
    {
        
logevent_round_end()
        
g_scorehumans 0
        g_scorezombies 
0
    
}
    else if (
equal(textmsg"#Game_Commencing"))
    {
        
g_gamecommencing true
        g_scorehumans 
0
        g_scorezombies 
0
    
}
    else if (
equal(textmsg"#Hostages_Not_Rescued") || equal(textmsg"#Round_Draw") || equal(textmsg"#Terrorists_Win") || equal(textmsg"#CTs_Win"))
    {
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;


public 
plugin_init() register_logevent("logevent_round_end"2"1=Round_End")

public 
logevent_round_end()
{
    static 
Float:lastendtimeFloat:current_time
    current_time 
get_gametime()
    if (
current_time lastendtime 0.5) return;
    
lastendtime current_time
    
    g_endround 
true
    
    remove_task
(TASK_WELCOMEMSG)
    
remove_task(TASK_MAKEZOMBIE)
    
    if (!
fnGetZombies())
    {        
        
PlaySoundsound_win_humansrandom_num0sizeofsound_win_humans ) - ) ]);
        if (!
g_gamecommencingg_scorehumans++
        
        
ExecuteForward(g_fwRoundEndg_fwDummyResultZP_TEAM_HUMAN);
    }
    else if (!
fnGetHumans())
    {        
        
PlaySoundsound_win_zombiesrandom_num0sizeofsound_win_zombies ) - ) ] )
        if (!
g_gamecommencingg_scorezombies++
        
        
ExecuteForward(g_fwRoundEndg_fwDummyResultZP_TEAM_ZOMBIE);
    }
    else
    {
        
set_hudmessage(02000HUD_EVENT_XHUD_EVENT_Y00.03.02.01.0, -1)
        
ShowSyncHudMsg(0g_MsgSync"Nadie ha ganado")
        
        
PlaySoundsound_win_no_one );
        
        
ExecuteForward(g_fwRoundEndg_fwDummyResultZP_TEAM_NO_ONE);
    }
    
    static 
entent = -1
    
    
while ((ent find_ent_by_class(ententclas)) != || (ent find_ent_by_class(entitem_class_name)) != 0){
        
remove_entity(ent)
    }
    
    
g_gamecommencing false
    
    balance_teams
()

__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 03-08-2014 , 18:11   Re: Round Not Finish
Reply With Quote #2

Quote:
Originally Posted by Roccoxx View Post
PHP Code:
if (equal(textmsg"#Hostages_Not_Rescued"))
    {
        return 
PLUGIN_HANDLED;
    } 
ZP spawns a hostage outside the map in order to end the round when timer reaches 0(trigger hostages not rescued).
Either you removed the hostage entity or you're blocking the round end with the code i quoted above.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
Kiske
Veteran Member
Join Date: May 2009
Old 03-08-2014 , 20:05   Re: Round Not Finish
Reply With Quote #3

Quote:
Originally Posted by georgik57 View Post
ZP spawns a hostage outside the map in order to end the round when timer reaches 0(trigger hostages not rescued).
Either you removed the hostage entity or you're blocking the round end with the code i quoted above.
That code come with ZP plugin.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Roccoxx
AlliedModders Donor
Join Date: Jan 2012
Location: Argentina
Old 03-08-2014 , 20:45   Re: Round Not Finish
Reply With Quote #4

Quote:
Originally Posted by georgik57 View Post
ZP spawns a hostage outside the map in order to end the round when timer reaches 0(trigger hostages not rescued).
Either you removed the hostage entity or you're blocking the round end with the code i quoted above.
heeeyyyy thanks man!, i remove the code of plugin_init
__________________
Tutorials here (Spanish)

Like as another Pijudo said: "Tired and retired"
Roccoxx is offline
Send a message via MSN to Roccoxx
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 15:41.


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