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

Subplugin Submission THANOS MODE ZOMBIE PLAGUE 4.3 & 4.3fix5a


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NIGHT HOWLER
New Member
Join Date: Oct 2020
Location: India
Old 10-06-2020 , 05:41   THANOS MODE ZOMBIE PLAGUE 4.3 & 4.3fix5a
Reply With Quote #1

THANOS MODE ZOMBIE PLAGUE 4.3 & 4.3fix5a


This is a converted plugin, original mode was made by Perfect Scrash for Zombie Plague Special.
Original Mode link here


To the fans of Zombie Plague, you might have saw the Thanos Mode made by Perfect Scrash in Zombie Plague Special. Now its been in demand since the mod was made, that convert or make this as a mod for zombie plague 4.3 . But it wasnt possible to make it as mode in zombie plague 4.3 because of few reasons, like how could we add it in the main core or how will we start this mod. And as zombie plague 4.3 dint allow us to register gamemodes, making it for zp4.3 was not so easy and it could be only possible during lots of changes in core plugin. So here i presents you Thanos Mod specially converted for zp4.3 and zp4.3fix5a . This mode will run as a secondary mode for our Nemesis Mod.


Requirements:
  • Amx Mod 1.8.2 or higher
  • Zombie Plague 4.3 or Zombie Plague 4.3 Fix5a​

Installation:
For Zombie Plague 4.3Fix5a
  1. Compile all Plugins and paste them in plugins folder and add there name in your plugins-zplague.ini
  2. Open your zombieplague.ini and edit it correctly. Add lines from my given zombieplague.ini in their respective section. Ex: Add "THANOS = zp_thanos" in section [Player Models]. Otherwise it will use default model of zombie.
  3. Open your zombieplague.cfg and add cvars as mention in the thread of this plugin.
  4. Copy paste the game resources and other files in their respective folders.

For Zombie Plague 4.3
Well we need to add a native in the core and zombie plague include. The main reason is that if we use api plugins to change thanos model, its model will be remain same till map changes. So we made a cvar zp_override_user_model(id) which will be registered in core and will use tasks for resetting model. So follow these 3 steps for that.
1. Open zombieplague.sma and find this line/code:
PHP Code:
register_native("zp_force_buy_extra_item""native_force_buy_extra_item"1
Add a line after this line
PHP Code:
register_native("zp_override_user_model""native_override_user_model"1
2. Now again Find this code:
PHP Code:
// Native: zp_force_buy_extra_item
public native_force_buy_extra_item(iditemidignorecost)
{
    
// ZP disabled
    
if (!g_pluginenabled)
        return 
false;
    
    if (!
is_user_valid_alive(id))
    {
        
log_error(AMX_ERR_NATIVE"[ZP] Invalid Player (%d)"id)
        return 
false;
    }
    
    if (
itemid || itemid >= g_extraitem_i)
    {
        
log_error(AMX_ERR_NATIVE"[ZP] Invalid extra item id (%d)"itemid)
        return 
false;
    }
    
    
buy_extra_item(iditemidignorecost)
    return 
true;

​After this code, add one more code.
PHP Code:
// Native: zp_override_user_model
public native_override_user_model(id, const newmodel[], modelindex)
{
    
// ZP disabled
    
if (!g_pluginenabled)
        return 
false;
    
    if (!
is_user_valid_connected(id))
    {
        
log_error(AMX_ERR_NATIVE"[ZP] Invalid Player (%d)"id)
        return 
false;
    }
    
    
// Strings passed byref
    
param_convert(2)
    
    
// Remove previous tasks
    
remove_task(id+TASK_MODEL)
    
    
// Custom models stuff
    
static currentmodel[32]
    
    if (
g_handle_models_on_separate_ent)
    {
        
// Set the right model
        
copy(g_playermodel[id], charsmax(g_playermodel[]), newmodel)
        if (
g_set_modelindex_offset && modelindexfm_cs_set_user_model_index(idmodelindex)
        
        
// Set model on player model entity
        
fm_set_playermodel_ent(id)
    }
    else
    {
        
// Get current model for comparing it with the current one
        
fm_cs_get_user_model(idcurrentmodelcharsmax(currentmodel))
        
        
// Set the right model, after checking that we don't already have it
        
if (!equal(currentmodelnewmodel))
        {
            
copy(g_playermodel[id], charsmax(g_playermodel[]), newmodel)
            if (
g_set_modelindex_offset && modelindexfm_cs_set_user_model_index(idmodelindex)
            
            
// An additional delay is offset at round start
            // since SVC_BAD is more likely to be triggered there
            
if (g_newround)
                
set_task(5.0 g_modelchange_delay"fm_user_model_update"id+TASK_MODEL)
            else
                
fm_user_model_update(id+TASK_MODEL)
        }
    }
    return 
true;

3. Now open zombieplague.inc and add this line in the end:
PHP Code:
/**
 * Overrides ZP player model with a different custom model.
 *
 * Note: This will last until player's next infection/humanization/respawn.
 *
 * Note: Don't call more often than absolutely needed.
 *
 * @param id        Player index.
 * @param newmodel    Model name.
 * @param modelindex    Modelindex (optional).
 */
native zp_override_user_model(id, const newmodel[], modelindex 0
Make sure when you compile plugin of this mod, you need to replace zombie plague core plugin, i.e. zombieplague40.sma too, else natives will not work and server will crash. So replace new compiled zombieplague40.amxx
After this, just follow the steps of installation for Zp4.3fix5a cuz zombieplague 4.3fix5a had that native already.

Game Cvars:

Code:
////////////////////////////////    THANOS MODE    /////////////////////////////

//Thanos Mode Cvars
zp_thanos 1            //Enable/Disable mod. [ 1= enable/ 0=disable / deafult 1]
zp_thanos_run_pre 0        // will thanos mode will run from start instead of Nemesis Mod.
                                     // [0- need to enable from thanos menu/ 1- Will be running instead of Nemesis Mod. To run nemesis, disable from menu/ default- 0]

// Thanos Cvars
zp_thanos_skill_countdown 5            // Skill use delay
zp_thanos_all_gems_time_allow 120    // Delay for allowing to snap fingers (Only in a Thanos Round)

// Power Stone Cvars
zp_thanos_power_damage 10000    // Power Stone damage
zp_thanos_power_radius 300        // Power Stone Radius
zp_thanos_power_knockback 2000    // Power Stone Knockback force (If player survives)

// Soul Stone Cvars
zp_thanos_soul_speed 600    // Speed to push for absortion
zp_thanos_soul_radius 500    // Radius of 'Black hole'
zp_thanos_soul_duration 5    // Soul Stone Skill Duration

// Reality/Mind/Time Stone
zp_thanos_time_duration 10        // Time Stone Skill Duration
zp_thanos_reality_duration 10    // Reality Stone Skill Duration
zp_thanos_mind_duration 10        // Mind Stone Skill Duration

zp_frost_dur 5            // duration of thanos to be freezed when affected by frost nade, deafult is 5
Open Thanos Menu with this console command: zp_thanosmode_menu

Gameplay Description:
  • If mod is enabled from menu, in nemesis mod , nemesis will become Thanos and will have thanos power.
  • If mod is disabled, nemesis mod will be just like a regular nemesis mod.
  • If mod is enable and player became nemesis in any other round, or he/she buy nemesis in any other round, he will be nemesis, not thanos. Thanos is only for Nemesis Mod.
  • Flag access for Thanos menu is by default ADMIN_KICK. Change it inside sma to change flag access. [#define ADMIN_ACCESS_THANOS ADMIN_KICK]

Infinity Stone / Snap Skill Descriptions:
  • Power Stone: can kill anyone that around you
  • Space Stone: can teleport to aim with a trisseract
  • Reality Stone: can remove weapons from the person who is firing
  • Soul Stone: can absorb humans into a soul stone (Basing in theories)
  • Time Stone: can stop time for a few seconds
  • Mind Stone: can use a laser ray (Basing in some of Vision powers)
  • Snap the Fingers: Kill half of alive humans (Thanos Round Available Only)

NOTE:
Well I will suggest users to disable nemesis mod sound, cuz nemesis sound and duration will create mixing of sound or sudden pausing of sound. So try not using Nemesis round sound for a better enjoyment.


CREDITS:-
Perfect Scrash For Original Plugin
Alexander Kormin For making it zombie plague4.3 zombie class [he had removed natives of zps and added natives of zp4.3 so i used his plugin to convert it to mod. ]
NIGHT HOWLER for removing zombie class, remaking it as a mod for a secondary mode for NEMESIS MODE. Adding custom sounds for mod and making menu to enable/disable mod.
Attached Files
File Type: txt installation.txt (5.5 KB, 135 views)
File Type: zip models.zip (1.54 MB, 203 views)
File Type: zip sound.zip (7.26 MB, 199 views)
File Type: zip plugins-thanos.zip (23.5 KB, 212 views)

Last edited by NIGHT HOWLER; 10-06-2020 at 05:46.
NIGHT HOWLER is offline
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 10:41.


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