Quote:
Originally Posted by gubka
Small update, dont forget update translation files
|
in weapons.ini, revolver settings
"Revolver"
{
"weaponentity" "weapon_revolver"
"weaponcost" "3"
"weaponslot" "0"
"weaponlvl" "1"
"weapononline" "1"
"weapondamage" "1.0"
"weaponknock" "1.0"
}
this settings don't change.
Another bug: Tank zombie has a bug with textures.
I use this:
http://gamebanana.com/skins/151190
http://images.akamai.steamuserconten...0501E6C856D10/
PHP Code:
/**
* ============================================================================
*
* Zombie Plague Mod #3 Generation
*
*
* Copyright (C) 2015 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 ZombieClassTank =
{
name = "[ZP] Zombie Class: Tank",
author = "qubka (Nikita Ushakov)",
description = "Addon of zombie classses",
version = "3.0",
url = "https://forums.alliedmods.net/showthread.php?t=290657"
}
/**
* @section Information about zombie class.
**/
#define ZOMBIE_CLASS_NAME "Tanque" // If string has @, phrase will be taken from translation file
#define ZOMBIE_CLASS_MODEL "models/player/custom_player/kodua/bloat_albinov2/bloat.mdl"
#define ZOMBIE_CLASS_CLAW "models/zombie/normal_f/hand/hand_zombie_normal_f.mdl"
#define ZOMBIE_CLASS_HEALTH 9000
#define ZOMBIE_CLASS_SPEED 0.8
#define ZOMBIE_CLASS_GRAVITY 1.0
#define ZOMBIE_CLASS_KNOCKBACK 0.5
#define ZOMBIE_CLASS_FEMALE NO
#define ZOMBIE_CLASS_VIP NO
#define ZOMBIE_CLASS_DURATION 5
#define ZOMBIE_CLASS_COUNTDOWN 40
#define ZOMBIE_CLASS_REGEN_HEALTH 200
#define ZOMBIE_CLASS_REGEN_INTERVAL 2.0
/**
* @endsection
**/
// Initialize zombie class index
int gZombieTank;
#pragma unused gZombieTank
/**
* Plugin is loading.
**/
public void OnPluginStart(/*void*/)
{
// Initilizate zombie class
gZombieTank = ZP_RegisterZombieClass(ZOMBIE_CLASS_NAME,
ZOMBIE_CLASS_MODEL,
ZOMBIE_CLASS_CLAW,
ZOMBIE_CLASS_HEALTH,
ZOMBIE_CLASS_SPEED,
ZOMBIE_CLASS_GRAVITY,
ZOMBIE_CLASS_KNOCKBACK,
ZOMBIE_CLASS_FEMALE,
ZOMBIE_CLASS_VIP,
ZOMBIE_CLASS_DURATION,
ZOMBIE_CLASS_COUNTDOWN,
ZOMBIE_CLASS_REGEN_HEALTH,
ZOMBIE_CLASS_REGEN_INTERVAL);
}
/**
* The map is starting.
**/
public void OnMapStart(/*void*/)
{
// Sounds
FakePrecacheSound("zbm3/antidamage.mp3");
}
/**
* 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)
{
#pragma unused clientIndex
SDKHook(clientIndex, SDKHook_TraceAttack, DamageTraceAttack);
}
/**
* Called when a client use a zombie skill.
*
* @param clientIndex The client index.
*
* @return Plugin_Handled to block using skill. Anything else
* (like Plugin_Continue) to allow use.
**/
public Action ZP_OnSkillUsed(int clientIndex)
{
#pragma unused clientIndex
// Validate client
if(!IsPlayerExist(clientIndex))
{
return Plugin_Handled;
}
// Validate the zombie class index
if(ZP_GetClientZombieClass(clientIndex) == gZombieTank)
{
// Set color
SetEntityRenderMode(clientIndex, RENDER_TRANSCOLOR);
SetEntityRenderColor(clientIndex, 0, 0, 0, 255);
// Emit sound
EmitSoundToAll("*/zbm3/antidamage.mp3", clientIndex, SNDCHAN_STATIC, SNDLEVEL_NORMAL);
}
// Allow usage
return Plugin_Continue;
}
/**
* Called when a zombie skill duration is over.
*
* @param clientIndex The client index.
**/
public void ZP_OnSkillOver(int clientIndex)
{
#pragma unused clientIndex
// Validate client
if(!IsPlayerExist(clientIndex))
{
return;
}
// Validate the zombie class index
if(ZP_GetClientZombieClass(clientIndex) == gZombieTank)
{
// Remove color
SetEntityRenderMode(clientIndex, RENDER_TRANSCOLOR);
SetEntityRenderColor(clientIndex, 255, 255, 255, 255);
}
}
/**
* Hook: OnTraceAttack
* Called right before the bullet enters a client.
*
* @param victimIndex The victim index.
* @param attackerIndex The attacker index.
* @param inflicterIndex The inflictor index.
* @param damageAmount The amount of damage inflicted.
* @param damageBits The type of damage inflicted.
* @param ammoType The ammo type of the attacker's weapon.
* @param hitroupBox The hitbox index.
* @param hitgroupIndex The hitgroup index.
**/
public Action DamageTraceAttack(int victimIndex, int &attackerIndex, int &inflicterIndex, float &damageAmount, int &damageBits, int &ammoType, int hitroupBox, int hitgroupIndex)
{
#pragma unused victimIndex
// Validate client
if(!IsPlayerExist(victimIndex))
{
return Plugin_Handled;
}
// If client used the zombie skill, then stop appling damage
if (ZP_IsPlayerZombie(victimIndex))
{
// Validate the zombie class index
if(ZP_GetClientZombieClass(victimIndex) == gZombieTank && ZP_IsPlayerUseZombieSkill(victimIndex))
{
return Plugin_Handled;
}
}
// Allow trace
return Plugin_Continue;
}
In swarm mode zombies can buy antidot.
Solution in zbm3_extraitem_antidot.sp :¨
PHP Code:
if(extraitemIndex == iItem)
{
// If you don't allowed to buy, then return ammopacks
if(fnGetZombies() <= 1 || ZP_IsPlayerHuman(clientIndex))
{
return Plugin_Handled;
}
// Initialize round type
int CMode = ZP_GetRoundState(STATE_ROUND_MODE);
// Switch game round
switch(CMode)
{
// If specific game round modes, then don't allowed to buy and return ammopacks
case MODE_NONE, MODE_NEMESIS, MODE_SURVIVOR, MODE_ARMAGEDDON, MODE_SWARM: return Plugin_Handled;
// Change class to human
default : ZP_SwitchClass(TYPE_HUMAN, clientIndex);
}
}
And check:
Imagenlink
Health: @red7431
Don't show the health in red