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

[CS:GO] Zombie Plague 1.2.1 (Updated 01-Mar-2023)


Post New Thread Reply   
 
Thread Tools Display Modes
romeo7
Senior Member
Join Date: Mar 2017
Old 07-24-2018 , 06:13   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #551

Quote:
Originally Posted by Mikado View Post
Then share it with us if it's possible, or it's private or something like that ?
write pm.
romeo7 is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 07-24-2018 , 12:45   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #552

Quote:
Originally Posted by romeo7 View Post
write pm.
Next update will have new things for forwards in infect/humanize to avoid checking the nemesis or survivor state, the forward will pass thats cells

The big focus it to create goood cbaseweapons for custom attack weapons, if lasers will work i will add chainsaw and janus 7 from cso1

For example , the etherial in next update will be look like that, so it will be similar to the full custom attack weapons like there was in cs 1.6 zombie plague cso sersers
PHP Code:
/**
 * ============================================================================
 *
 *  Zombie Plague Mod #3 Generation
 *
 *
 *  Copyright (C) 2015-2018 Nikita Ushakov (Ireland, Dublin)
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * ============================================================================
 **/

#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <zombieplague>

#pragma newdecls required

/**
 * Record plugin info.
 **/
public Plugin myinfo =
{
    
name            "[ZP] Weapon: Ethereal",
    
author          "qubka (Nikita Ushakov)",
    
description     "Addon of survivor weapon",
    
version         "2.0",
    
url             "https://forums.alliedmods.net/showthread.php?t=290657"
}

/**
 * @section Information about weapon.
 **/
#define WEAPON_REFERANCE               "Etherial" // Models and other properties in the 'weapons.ini'
#define WEAPON_LASER_DAMAGE            GetRandomFloat(150.0, 200.0)
/**
 * @endsection
 **/

/**
 * @section Water levels.
 **/
#define WLEVEL_CSGO_DRY                0
#define WLEVEL_CSGO_FEET               1
#define WLEVEL_CSGO_HALF               2
#define WLEVEL_CSGO_FULL               3
/**
 * @endsection
 **/

// Initialize variables
int gWeapon;

// Variables for the key sound block
int gSound;

/**
 * Called after a zombie core is loaded.
 **/
public void ZP_OnEngineExecute(/*void*/)
{
    
// Initilizate weapon
    
gWeapon ZP_GetWeaponNameID(WEAPON_REFERANCE);
    if(
gWeapon == -1SetFailState("[ZP] Custom weapon ID from name : \"%s\" wasn't find"WEAPON_REFERANCE);

    
// Sounds
    
gSound ZP_GetSoundKeyID("ETHERIAL_SHOOT_SOUNDS");
}


//*********************************************************************
//*           Don't modify the code below this line unless            *
//*               you know _exactly_ what you are doing!!!             *
//*********************************************************************

void Weapon_OnReload(const int clientIndex, const int weaponIndex, const int iClip, const int iAmmo, const float flCurrentTime)
{
    
#pragma unused clientIndex, weaponIndex, iClip, iAmmo, flCurrentTime

    // Block the real attack
    
SetEntPropFloat(weaponIndexProp_Send"m_flNextPrimaryAttack"flCurrentTime 9999.9);

    
// Sets the next attack time
    
SetEntPropFloat(weaponIndexProp_Send"m_flEncodedController"flCurrentTime ZP_GetWeaponReload(gWeapon));
}

void Weapon_OnHolster(const int clientIndex, const int weaponIndex, const int iClip, const int iAmmo, const float flCurrentTime)
{
    
#pragma unused clientIndex, weaponIndex, iClip, iAmmo, flCurrentTime
    
    // Validate animation delay
    
if(GetEntPropFloat(weaponIndexProp_Send"m_flEncodedController") > flCurrentTime)
    {
        return;
    }

    
// Validate ammo
    
if(iClip ZP_GetWeaponClip(gWeapon))
    {
        
// Reset for allowing reload
        
SetEntPropFloat(weaponIndexProp_Send"m_flNextPrimaryAttack"flCurrentTime);
    }
}

void Weapon_OnDeploy(const int clientIndex, const int weaponIndex, const int iClip, const int iAmmo, const float flCurrentTime)
{
    
#pragma unused clientIndex, weaponIndex, iClip, iAmmo, flCurrentTime

    // Block the real attack
    
SetEntPropFloat(weaponIndexProp_Send"m_flNextPrimaryAttack"flCurrentTime 9999.9);

    
// Sets the next attack time
    
SetEntPropFloat(weaponIndexProp_Send"m_flEncodedController"flCurrentTime ZP_GetWeaponDeploy(gWeapon));
}

void Weapon_OnPrimaryAttack(const int clientIndex, const int weaponIndexint iClip, const int iAmmo, const float flCurrentTime)
{
    
#pragma unused clientIndex, weaponIndex, iClip, iAmmo, flCurrentTime

    // Validate ammo
    
if(iClip <= 0)
    {
        
Weapon_OnHolster(clientIndexweaponIndexiClipiAmmoflCurrentTime);
        return;
    }

    
// Validate animation delay
    
if(GetEntPropFloat(weaponIndexProp_Send"m_flEncodedController") > flCurrentTime)
    {
        return;
    }

    
// Validate water
    
if(GetEntProp(clientIndexProp_Data"m_nWaterLevel") == WLEVEL_CSGO_FULL)
    {
        return;
    }

    
// Substract ammo
    
iClip -= 1SetEntProp(weaponIndexProp_Send"m_iClip1"iClip); 
    if(!
iClipWeapon_OnHolster(clientIndexweaponIndexiClipiAmmoflCurrentTime ZP_GetWeaponSpeed(gWeapon));

    
// Sets the next attack time
    
SetEntPropFloat(weaponIndexProp_Send"m_flEncodedController"flCurrentTime ZP_GetWeaponSpeed(gWeapon));

    
// Emit sound
    
ZP_EmitSoundKeyID(weaponIndexgSoundSNDCHAN_WEAPON1);
    
    
// Sets the attack animation
    
ZP_SetWeaponAnimation(clientIndex1);
    
    
// Create a trace
    
Weapon_OnCreateTrace(clientIndex);

    
// Apply the kick back
    
Weapon_OnKickBack(clientIndexGetRandomFloat(-5.05.0), GetRandomFloat(-5.05.0), GetRandomFloat(-2.02.0));
}

void Weapon_OnCreateTrace(const int attackerIndex)
{
    
#pragma unused attackerIndex

    // Initialize vectors
    
static float vBulletPosition[3]; static float vEntAngle[3]; static float vEntPosition[3];

    
// Gets attacker position
    
GetClientEyeAngles(attackerIndexvEntAngle);
    
GetClientEyePosition(attackerIndexvEntPosition);

    
// Calculate the infinite trace
    
Handle hTrace TR_TraceRayFilterEx(vEntPositionvEntAngleMASK_ALLRayType_InfiniteTraceFilterattackerIndex);
    
    
// Gets the client viewmodel 
    
int viewModel ZP_GetClientViewModel(clientIndextrue); /// True for getting the custom one

    // Create a muzzleflesh
    
FakeDispatchEffect(viewModel"weapon_muzzle_flash_taser""ParticleEffect"vEntPositionvEntPosition_1);
    
TE_SendToClient(attackerIndex);

    
// Validate trace
    
if(TR_DidHit(hTrace))
    {
        
// Gets the victim index
        
int victimIndex TR_GetEntityIndex(hTrace);

        
// Gets the end point
        
TR_GetEndPosition(vBulletPosition);

        
// Create a tracer
        
FakeDispatchEffect(viewModel"weapon_tracers_taser""ParticleEffect"vEntPositionvBulletPosition_1);
        
TE_SendToClient(attackerIndex);

        
// Create a glow impact
        
FakeDispatchEffect(_"weapon_taser_glow_impact""ParticleEffect"vBulletPositionvBulletPosition);
        
TE_SendToAll();

        
// Validate victim
        
if(IsPlayerExist(victimIndex) && ZP_IsPlayerZombie(victimIndex))
        {
            
// Create the damage for a victim
            
SDKHooks_TakeDamage(victimIndexattackerIndexattackerIndexWEAPON_LASER_DAMAGE);
        }
    }

    
// Close the trace
    
CloseHandle(hTrace);
}

void Weapon_OnKickBack(const int clientIndex, const float flYaw 0.0, const float flPitch 0.0, const float flRoll 0.0)
{
    
#pragma unused clientIndex, flYaw, flPitch, flRoll

    // Initialize vectors
    
static float vVelocity[3]; static float vPunchAngle[3];

    
// Gets the punch angle
    
vPunchAngle[0] = flYaw;
    
vPunchAngle[1] = flPitch;
    
vPunchAngle[2] = flRoll;
    
    
// Gets the client flags
    
int iFlags GetEntityFlags(clientIndex);

    
// Gets the client velocity
    
GetEntPropVector(clientIndexProp_Data"m_vecVelocity"vVelocity);

    
/// Apply kick back

    
if(!(SquareRoot(Pow(vVelocity[0], 2.0) + Pow(vVelocity[1], 2.0))))
    {
        
//vPunchAngle[0] *= 1.0; vPunchAngle[1] *= 1.0; vPunchAngle[2] *= 1.0; 
        
SetEntPropVector(clientIndexProp_Send"m_aimPunchAngle"vPunchAngle);
        
SetEntPropVector(clientIndexProp_Send"m_viewPunchAngle"vPunchAngle);
    }
    else if (!(
iFlags FL_ONGROUND))
    {
        
vPunchAngle[0] *= 2.0vPunchAngle[1] *= 2.0vPunchAngle[2] *= 2.0
        
SetEntPropVector(clientIndexProp_Send"m_aimPunchAngle"vPunchAngle);
        
SetEntPropVector(clientIndexProp_Send"m_viewPunchAngle"vPunchAngle);
    }
    else if (
iFlags FL_DUCKING)
    {
        
vPunchAngle[0] *= 0.5vPunchAngle[1] *= 0.5vPunchAngle[2] *= 0.5
        
SetEntPropVector(clientIndexProp_Send"m_aimPunchAngle"vPunchAngle);
        
SetEntPropVector(clientIndexProp_Send"m_viewPunchAngle"vPunchAngle);
    }
    else
    {
        
vPunchAngle[0] *= 1.5vPunchAngle[1] *= 1.5vPunchAngle[2] *= 1.5
        
SetEntPropVector(clientIndexProp_Send"m_aimPunchAngle"vPunchAngle);
        
SetEntPropVector(clientIndexProp_Send"m_viewPunchAngle"vPunchAngle);
    }
}


//**********************************************
//* Item (weapon) hooks.                       *
//**********************************************

#define _call.%0(%1,%2)         \
                                
\
    
Weapon_On%0                 \
    (                           \
        %
1,                     \
        %
2,                     \
                                \
        
GetEntProp(%2Prop_Send"m_iClip1"), \
                                \
        
GetEntProp(%2Prop_Send"m_iPrimaryReserveAmmoCount"), \
                                \
        
GetGameTime()           \
    )    
    
/**
 * Called once a client is authorized and fully in-game, and 
 * after all post-connection authorizations have been performed.  
 *
 * This callback is gauranteed to occur on all clients, and always 
 * after each OnClientPutInServer() call.
 * 
 * @param clientIndex       The client index. 
 **/
public void OnClientPostAdminCheck(int clientIndex)
{
    
// Hook entity callbacks
    
SDKHook(clientIndexSDKHook_WeaponSwitchPostWeaponOnDeployPost);
}

/**
 * Called after a custom weapon is created.
 *
 * @param weaponIndex       The weapon index.
 * @param weaponID          The weapon id.
 **/
public void ZP_OnWeaponCreated(int weaponIndexint weaponID)
{
    
// Validate custom weapon
    
if(weaponID == gWeapon)
    {
        
// Hook entity callbacks
        
SDKHook(weaponIndexSDKHook_ReloadPostWeaponOnReloadPost);
    }
}

/**
 * Hook: WeaponSwitchPost
 * Player deploy any weapon.
 *
 * @param clientIndex       The client index.
 * @param weaponIndex       The weapon index.
 **/
public void WeaponOnDeployPost(int clientIndexint weaponIndex
{
    
// Apply fake deploy hook on the next frame
    
RequestFrame(view_as<RequestFrameCallback>(WeaponOnFakeDeployPost), GetClientUserId(clientIndex));
}

/**
 * FakeHook: WeaponSwitchPost
 *
 * @param userID            The user id.
 **/
public void WeaponOnFakeDeployPost(int userID)
{
    
// Gets the client index from the user ID
    
int clientIndex GetClientOfUserId(userID); int weaponIndex;

    
// Validate weapon
    
if(ZP_IsPlayerHoldWeapon(clientIndexweaponIndexgWeapon))
    {
        
// Call event
        
_call.Deploy(clientIndexweaponIndex);
    }
}

/**
 * Hook: WeaponReloadPost
 * Weapon is reloaded.
 *
 * @param weaponIndex       The weapon index.
 **/
public Action WeaponOnReloadPost(int weaponIndex
{
    
// Apply fake reload hook on the next frame
    
RequestFrame(view_as<RequestFrameCallback>(WeaponOnFakeReloadPost), EntIndexToEntRef(weaponIndex));
}

/**
 * FakeHook: WeaponReloadPost
 *
 * @param referenceIndex    The reference index.
 **/
public void WeaponOnFakeReloadPost(int referenceIndex
{
    
// Get the weapon index from the reference
    
int entityIndex EntRefToEntIndex(referenceIndex);

    
// Validate weapon
    
if(entityIndex != INVALID_ENT_REFERENCE)
    {
        
// Gets the weapon owner
        
int clientIndex GetEntPropEnt(entityIndexProp_Send"m_hOwner");

        
// Validate owner
        
if(IsPlayerExist(clientIndex))
        {
            
// Call event
            
_call.Reload(clientIndexentityIndex);
        }
    }
}

/**
 * Event: WeaponPostFrame
 * Weapon is holding.
 *  
 * @param clientIndex       The client index.
 * @param iButtons          Copyback buffer containing the current commands (as bitflags - see entity_prop_stocks.inc).
 * @param iImpulse          Copyback buffer containing the current impulse command.
 * @param flVelocity        Players desired velocity.
 * @param flAngles          Players desired view angles.    
 * @param weaponID          The entity index of the new weapon if player switches weapon, 0 otherwise.
 * @param iSubType          Weapon subtype when selected from a menu.
 * @param iCmdNum           Command number. Increments from the first command sent.
 * @param iTickCount        Tick count. A client prediction based on the server GetGameTickCount value.
 * @param iSeed             Random seed. Used to determine weapon recoil, spread, and other predicted elements.
 * @param iMouse            Mouse direction (x, y).
 **/ 
public Action OnPlayerRunCmd(int clientIndexint &iButtonsint &iImpulsefloat flVelocity[3], float flAngles[3], int &weaponIDint &iSubTypeint &iCmdNumint &iTickCountint &iSeedint iMouse[2])
{
    
// Validate weapon
    
static int weaponIndex;
    if(
ZP_IsPlayerHoldWeapon(clientIndexweaponIndexgWeapon))
    {
        
// Button primary attack press
        
if(iButtons IN_ATTACK)
        {
            
// Call event
            
_call.PrimaryAttack(clientIndexweaponIndex);
            
iButtons &= (~IN_ATTACK); //! Bugfix
            
return Plugin_Changed;
        }

        
// Button reload press
        
if(iButtons IN_RELOAD)
        {
            
// Call event
            
_call.Holster(clientIndexweaponIndex);
        }
    }
    
    
// Allow button
    
return Plugin_Continue;
}

//**********************************************
//* Item (laser) stocks.                       *
//**********************************************

/**
 * Trace filter.
 *  
 * @param entityIndex       The entity index.
 * @param contentsMask      The contents mask.
 * @param clientIndex       The client index.
 *
 * @return                  True or false.
 **/
public bool TraceFilter(int entityIndexint contentsMaskany clientIndex)
{
    
// If entity is a player, continue tracing
    
return clientIndex != entityIndex;

__________________

Last edited by gubka; 07-24-2018 at 12:57.
gubka is offline
Send a message via ICQ to gubka
Lost_lgz
Member
Join Date: Sep 2011
Old 07-24-2018 , 13:18   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #553

hmmmm....janus 7 it not very good.... [for me]
plazma it nice gun
__________________
Lost_lgz is offline
Send a message via Yahoo to Lost_lgz Send a message via Skype™ to Lost_lgz
Mikado
Senior Member
Join Date: Nov 2012
Location: don't know where :/
Old 07-24-2018 , 18:23   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #554

Gubka, why not making all the mod simple ( without any additionnal features ) and with his own post, and all the additionnal addons and extra items on separated posts, like was the for the AMXMODX version.

So people can make their own addons and items, and also for you the support and feedback will be easier
Mikado is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 07-24-2018 , 23:07   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #555

Quote:
Originally Posted by Mikado View Post
Gubka, why not making all the mod simple ( without any additionnal features ) and with his own post, and all the additionnal addons and extra items on separated posts, like was the for the AMXMODX version.

So people can make their own addons and items, and also for you the support and feedback will be easier
It just easier to update for me, if you don't need smth remove it)
P.S can anyone port me model of cso chainsaw ? With all same animations?
Oh i found tutorial: https://forums.alliedmods.net/showthread.php?t=286514
So i will do it by myself
__________________

Last edited by gubka; 07-25-2018 at 09:41.
gubka is offline
Send a message via ICQ to gubka
Qes
AlliedModders Donor
Join Date: Jul 2014
Old 07-26-2018 , 11:45   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #556

Why are not grenades refreshing in the new round?
Qes is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 07-27-2018 , 01:18   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #557

Quote:
Originally Posted by Qes View Post
Why are not grenades refreshing in the new round?
Because if the grenade not suitable for the class, it will removed. Logically.

The next update will include feature of auto-precache the textures(vmt/vtf) resourced(phy,dx90) sounds from the .mdl and pcf. So it the core will have new precache system So that will make the downloads.ini smaller. I will add the new natives and improve existed forwards, also will include feature of setting the dropped model seperately of world model + i will add chainsaw is well
__________________
gubka is offline
Send a message via ICQ to gubka
Diejka
New Member
Join Date: Jul 2018
Old 07-27-2018 , 15:58   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #558

Hello. Thx for u mod.
Can you help me with VDS?
What are the system requirements of VDS? 50-60 SLOTS

Last edited by Diejka; 07-27-2018 at 15:58.
Diejka is offline
Lost_lgz
Member
Join Date: Sep 2011
Old 07-28-2018 , 04:57   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #559

Quote:
Originally Posted by Diejka View Post
Hello. Thx for u mod.
Can you help me with VDS?
What are the system requirements of VDS? 50-60 SLOTS

procesor???
ram???
ssd?
__________________
Lost_lgz is offline
Send a message via Yahoo to Lost_lgz Send a message via Skype™ to Lost_lgz
romeo7
Senior Member
Join Date: Mar 2017
Old 07-28-2018 , 09:51   Re: [CS:GO] Experimental: Zombie Plague 8.1.0
Reply With Quote #560

Quote:
Originally Posted by gubka View Post
Because if the grenade not suitable for the class, it will removed. Logically.

The next update will include feature of auto-precache the textures(vmt/vtf) resourced(phy,dx90) sounds from the .mdl and pcf. So it the core will have new precache system So that will make the downloads.ini smaller. I will add the new natives and improve existed forwards, also will include feature of setting the dropped model seperately of world model + i will add chainsaw is well
I updated game mode sniper, but one think stay. i am not able to block weapon menu and extra items menu for sniper. i tested AddCommandListener & OnClientSayCommand, but no luck. Please add native for it (ex: ZP_BlockWeaponMenu(int clientIndex), ZP_BlockExtraItems(int clientIndex)) in next update.

Edit: I did it with forwarding weapons and extraitems to main menu. But would be nice adding natives.

Last edited by romeo7; 07-28-2018 at 17:00.
romeo7 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 13:00.


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