Raised This Month: $203 Target: $400
 50% 

ZP 5.0 Betas/Updates


Post New Thread Closed Thread   
 
Thread Tools Display Modes
XINLEI
me too
Join Date: Jun 2011
Location: Colombian Coffee storage
Old 11-18-2011 , 06:40   Re: ZP 5.0 Betas/Updates
#661

Quote:
Originally Posted by CHyCMyMpNk View Post
Copi - paste . Edit Nemesis & Survivor class and save, it's very easy...
Now thinking... Yea it's very easy.
XINLEI is offline
bartek93tbg
Member
Join Date: Apr 2011
Location: Poland
Old 11-18-2011 , 10:31   Re: ZP 5.0 Betas/Updates
#662

Two bugs can be easily fixed.

Quote:
Originally Posted by bartek93tbg View Post
Another thing: ZP 5 doesn't prevent playing same gamemode twice in row.
1. Open zp50_gamemodes.sma
2. Add
Code:
new g_PreviousGameMode = ZP_NO_GAME_MODE
3. Find function public choose_game_mode() and add the lines with bold font:

Code:
public choose_game_mode()
{
    if (GetAliveCount() <= 0)
        return
    
    new index, filename[64]
    
    for (index = g_DefaultGameMode + 1; /*no condition*/; index++)
    {
        if (index >= g_GameModeCount)
            index = 0
        
        if (g_ChosenGameMode != ZP_NO_GAME_MODE)
        {
            ArrayGetString(g_GameModeFileName, g_ChosenGameMode, filename, charsmax(filename))
            pause("ac", filename)
        }
        
        g_ChosenGameMode = index
        
        ArrayGetString(g_GameModeFileName, g_ChosenGameMode, filename, charsmax(filename))
        unpause("ac", filename)

        if (index == g_PreviousGameMode)
            continue
        
        if (index != g_DefaultGameMode)
        {
            ExecuteForward(g_Forwards[FW_GAME_MODE_CHOOSE_PRE], g_ForwardResult, g_ChosenGameMode, false)
            
            if (g_ForwardResult < PLUGIN_HANDLED)
            {
                ExecuteForward(g_Forwards[FW_GAME_MODE_CHOOSE_POST], g_ForwardResult, g_ChosenGameMode, RANDOM_TARGET_PLAYER)
                break
            }
        }
        else
        {
            ExecuteForward(g_Forwards[FW_GAME_MODE_CHOOSE_PRE], g_ForwardResult, g_ChosenGameMode, true)
            
            if (g_ForwardResult < PLUGIN_HANDLED)
            {
                ExecuteForward(g_Forwards[FW_GAME_MODE_CHOOSE_POST], g_ForwardResult, g_ChosenGameMode, RANDOM_TARGET_PLAYER)
                break
            }
            else
            {
                abort(AMX_ERR_GENERAL, "[ZP] Default game mode can't be started. Check server settings.")
                break
            }
        }
    }
}
4. Find function named public start_game_mode_task() and add the line with bold font:

Code:
public start_game_mode_task()
{
    if (g_ChosenGameMode == ZP_NO_GAME_MODE)
        return
    
    g_CurrentGameMode = g_ChosenGameMode
    g_PreviousGameMode = g_ChosenGameMode
    
    ExecuteForward(g_Forwards[FW_GAME_MODE_START], g_ForwardResult, g_CurrentGameMode)
}
5. Compile.
Quote:
Originally Posted by bartek93tbg View Post
Yeah, sometimes in new round, before game mode starts, humans turn into zombies and they are in CT team and can't be killed. But in ZP 5.0.7 it seems it has been already fixed, because I didn't get this bug yet.
Quote:
Originally Posted by bartek93tbg View Post
Just got this bug again and it is not funny. I have noticed that it only happens at map start, so i will add some auto-restarts after map is loaded.
1. Open zp50_core.sma
2. Add
Code:
#include <zp50_gamemodes>
3. Find public fw_PlayerSpawn_Post(id) and add the line with bold font:
Code:
public fw_PlayerSpawn_Post(id)
{
    if (!is_user_alive(id) || !cs_get_user_team(id))
        return
    
    ExecuteForward(g_Forwards[FW_USER_SPAWN_POST], g_ForwardResult, id)
    
    if (flag_get(g_RespawnAsZombie, id) && (zp_gamemodes_get_current() != ZP_NO_GAME_MODE))
        InfectPlayer(id, id)
    else
        CurePlayer(id)
    
    flag_unset(g_RespawnAsZombie, id)
}
4. Compile


MeRcyLeZZ probably would do it better, but before it is officially fixed, you can use my solution. Hope I help you.
bartek93tbg is offline
CHyCMyMpNk
Senior Member
Join Date: Jun 2008
Location: PTZ
Old 11-18-2011 , 11:39   Re: ZP 5.0 Betas/Updates
#663

bartek93tbg great, I will try.
CHyCMyMpNk is offline
Send a message via ICQ to CHyCMyMpNk
CHyCMyMpNk
Senior Member
Join Date: Jun 2008
Location: PTZ
Old 11-19-2011 , 14:18   Re: ZP 5.0 Betas/Updates
#664

bartek93tbg, I think with first fix (in zp50_gamemodes.sma) modes have become more run, that's correct?
CHyCMyMpNk is offline
Send a message via ICQ to CHyCMyMpNk
bartek93tbg
Member
Join Date: Apr 2011
Location: Poland
Old 11-19-2011 , 15:40   Re: ZP 5.0 Betas/Updates
#665

Sorry, I don't understand. Could you explain it a little bit more, please?

Last edited by bartek93tbg; 11-19-2011 at 15:40.
bartek93tbg is offline
CHyCMyMpNk
Senior Member
Join Date: Jun 2008
Location: PTZ
Old 11-19-2011 , 16:37   Re: ZP 5.0 Betas/Updates
#666

= )
with first fix (in zp50_gamemodes.sma)

too often become game mode - surv, nem etc


ok, how this command works? percentage or something else?
zp_survivor_chance 50 // Chance (1 in X)
CHyCMyMpNk is offline
Send a message via ICQ to CHyCMyMpNk
bartek93tbg
Member
Join Date: Apr 2011
Location: Poland
Old 11-19-2011 , 17:01   Re: ZP 5.0 Betas/Updates
#667

I hadn't used fix #1 too long so i wasn't able to discover this issue I think it just depends on game mode cvar_chance.

zp_survivor_chance 50
Yeah, it means you have got 2% (1 to 50) chance of getting survivor round.
bartek93tbg is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 11-19-2011 , 21:21   Re: ZP 5.0 Betas/Updates
#668

zp_survivor_chance is a chance for survivor rounds

lower value means more survivor rounds
__________________
Snaker beatter is offline
mo4151
Junior Member
Join Date: Jul 2011
Old 11-23-2011 , 06:45   Re: ZP 5.0 Betas/Updates
#669

this is zombie plugins 5.0??
mo4151 is offline
Snaker beatter
Veteran Member
Join Date: Sep 2011
Location: Manila, Philippines
Old 11-23-2011 , 06:45   Re: ZP 5.0 Betas/Updates
#670

yes
__________________
Snaker beatter is offline
Closed Thread


Thread Tools
Display Modes

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 10:18.


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