Raised This Month: $12 Target: $400
 3% 

Suggestion / Subplugin Request [ZP] Help! Yeah, I need it.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 04-09-2015 , 10:32   [ZP] Help! Yeah, I need it.
Reply With Quote #1

Always wanted a horde mode for ZP

It is possible as a game mode?

Like turn all bots to zombies.

I never fiddled with the ZP 5.0 codes, so I have no idea.

Thanks.

-jc980
__________________
jc980 is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 04-09-2015 , 13:42   Re: [ZP] Help! Yeah, I need it.
Reply With Quote #2

You mean like survivor mode? one human rest bots/zombies? or what..

check this https://forums.alliedmods.net/showpo...76&postcount=4

Last edited by wicho; 04-09-2015 at 14:28.
wicho is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 04-10-2015 , 11:28   Re: [ZP] Help! Yeah, I need it.
Reply With Quote #3

Quote:
Originally Posted by wicho View Post
You mean like survivor mode? one human rest bots/zombies? or what..

check this https://forums.alliedmods.net/showpo...76&postcount=4
I mean't like a custom gamemode itself.

Pretty much disabling all the other modes, except this one.

So my friend and I can play a horde PvE style, because we are sick of infection and all the other modes.

Oh yea, forgot to mention, I wanted ZP to be like ZombieHell mod, but not in a shitty way.
__________________
jc980 is offline
New.ZM.Life
Veteran Member
Join Date: Sep 2014
Location: Iran
Old 04-10-2015 , 12:35   Re: [ZP] Help! Yeah, I need it.
Reply With Quote #4

Quote:
Originally Posted by jc980 View Post
I mean't like a custom gamemode itself.

Pretty much disabling all the other modes, except this one.

So my friend and I can play a horde PvE style, because we are sick of infection and all the other modes.

Oh yea, forgot to mention, I wanted ZP to be like ZombieHell mod, but not in a shitty way.

its possible, just make mode and needed classes,
next, you have to disable all gamemodes and classes from plugin list except your new mode
so, it will start up every round...
__________________
PLUGINS

Zombie Plague 5.0 + New Modes

Added NightCrawler Mode to ZP





New.ZM.Life is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 04-10-2015 , 13:05   Re: [ZP] Help! Yeah, I need it.
Reply With Quote #5

The advantage with 5.0 is that you can disable/enable the modes in plugins-zp50_ammopacks.ini, u can learn more about 5.0 natives in zp50_zp43_compat.sma. Maybe in these days i do a thread with the list of natives of 4.3 and 5.0..

Try this:

PHP Code:
/*================================================================================
    
    -----------------------------
    -*- [ZP] Game Mode: ZombieHell  -*-
    -----------------------------
    
    This plugin is part of Zombie Plague Mod and is distributed under the
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
    
================================================================================*/

#include <amxmodx>
#include <cstrike>
#include <amx_settings_api>
#include <zp50_gamemodes>
#include <zp50_deathmatch>

// Settings file
new const ZP_SETTINGS_FILE[] = "zombieplague.ini"

// Default sounds
new const sound_swarm[][] = { "ambience/the_horror2.wav" }

#define SOUND_MAX_LENGTH 64

new Array:g_sound_swarm

// HUD messages
#define HUD_EVENT_X -1.0
#define HUD_EVENT_Y 0.17
#define HUD_EVENT_R 20
#define HUD_EVENT_G 255
#define HUD_EVENT_B 20

new g_MaxPlayers
new g_HudSync

new cvar_swarm_chancecvar_swarm_min_players
new cvar_swarm_show_hudcvar_swarm_sounds
new cvar_swarm_allow_respawn

public plugin_precache()
{
    
// Register game mode at precache (plugin gets paused after this)
    
register_plugin("[ZP] Game Mode: ZombieHell"ZP_VERSION_STRING"ZP Dev Team")
    
zp_gamemodes_register("ZombieHell Mode")
    
    
// Create the HUD Sync Objects
    
g_HudSync CreateHudSyncObj()
    
    
g_MaxPlayers get_maxplayers()
    
    
cvar_swarm_chance register_cvar("zp_swarm_chance""20")
    
cvar_swarm_min_players register_cvar("zp_swarm_min_players""0")
    
cvar_swarm_show_hud register_cvar("zp_swarm_show_hud""1")
    
cvar_swarm_sounds register_cvar("zp_swarm_sounds""1")
    
cvar_swarm_allow_respawn register_cvar("zp_swarm_allow_respawn""0")
    
    
// Initialize arrays
    
g_sound_swarm ArrayCreate(SOUND_MAX_LENGTH1)
    
    
// Load from external file
    
amx_load_setting_string_arr(ZP_SETTINGS_FILE"Sounds""ROUND SWARM"g_sound_swarm)
    
    
// If we couldn't load custom sounds from file, use and save default ones
    
new index
    
if (ArraySize(g_sound_swarm) == 0)
    {
        for (
index 0index sizeof sound_swarmindex++)
            
ArrayPushString(g_sound_swarmsound_swarm[index])
        
        
// Save to external file
        
amx_save_setting_string_arr(ZP_SETTINGS_FILE"Sounds""ROUND SWARM"g_sound_swarm)
    }
    
    
// Precache sounds
    
new sound[SOUND_MAX_LENGTH]
    for (
index 0index ArraySize(g_sound_swarm); index++)
    {
        
ArrayGetString(g_sound_swarmindexsoundcharsmax(sound))
        if (
equal(sound[strlen(sound)-4], ".mp3"))
        {
            
format(soundcharsmax(sound), "sound/%s"sound)
            
precache_generic(sound)
        }
        else
            
precache_sound(sound)
    }
}

// Deathmatch module's player respawn forward
public zp_fw_deathmatch_respawn_pre(id)
{
    
// Respawning allowed?
    
if (!get_pcvar_num(cvar_swarm_allow_respawn))
        return 
PLUGIN_HANDLED;
    
    return 
PLUGIN_CONTINUE;
}

public 
zp_fw_gamemodes_choose_pre(game_mode_idskipchecks)
{
    if (!
skipchecks)
    {
        
// Random chance
        
if (random_num(1get_pcvar_num(cvar_swarm_chance)) != 1)
            return 
PLUGIN_HANDLED;
        
        
// Min players
        
if (GetAliveCount() < get_pcvar_num(cvar_swarm_min_players))
            return 
PLUGIN_HANDLED;
    }
    
    
// Game mode allowed
    
return PLUGIN_CONTINUE;
}

public 
zp_fw_gamemodes_start()
{
    new 
id
    
    
// Turn every Terrorist into a zombie
    
for (id 1id <= g_MaxPlayersid++)
    {
        
// Not alive
        
if (!is_user_alive(id))
            continue;
        
         if (
is_user_bot(id))
         {
                
// Turn into a zombie
            
zp_core_infect(id0)
         }
    }
    
    
// Play swarm sound
    
if (get_pcvar_num(cvar_swarm_sounds))
    {
        new 
sound[SOUND_MAX_LENGTH]
        
ArrayGetString(g_sound_swarmrandom_num(0ArraySize(g_sound_swarm) - 1), soundcharsmax(sound))
        
PlaySoundToClients(sound)
    }
    
    if (
get_pcvar_num(cvar_swarm_show_hud))
    {
        
// Show Swarm HUD notice
        
set_hudmessage(HUD_EVENT_RHUD_EVENT_GHUD_EVENT_BHUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
        
ShowSyncHudMsg(0g_HudSync"ZombieHell Mode")
    }
}

// Plays a sound on clients
PlaySoundToClients(const sound[])
{
    if (
equal(sound[strlen(sound)-4], ".mp3"))
        
client_cmd(0"mp3 play ^"sound/%s^""sound)
    else
        
client_cmd(0"spk ^"%s^""sound)
}

// Get Alive Count -returns alive players number-
GetAliveCount()
{
    new 
iAliveid
    
    
for (id 1id <= g_MaxPlayersid++)
    {
        if (
is_user_alive(id))
            
iAlive++
    }
    
    return 
iAlive;


Last edited by wicho; 04-11-2015 at 01:50.
wicho is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 04-11-2015 , 07:35   Re: [ZP] Help! Yeah, I need it.
Reply With Quote #6

Quote:
Originally Posted by New.ZM.Life View Post
its possible, just make mode and needed classes,
next, you have to disable all gamemodes and classes from plugin list except your new mode
so, it will start up every round...
Im requesting, not requiring help in coding.

@wicho

Thanks.
__________________
jc980 is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 04-12-2015 , 17:58   Re: [ZP] Help! Yeah, I need it.
Reply With Quote #7

@wicho why don't you edit the survivor game mode, and instead of making the player survivor, make him the last human and infect the rest, because not all servers are supporting bots
__________________
Discord contacts:
I rarely look at private messages here, but I am very active on Discord!
happy_2012 is offline
Reply


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 20:56.


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