Raised This Month: $ Target: $400
 0% 

[Help] ZM class for vips


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
CoolPad
New Member
Join Date: Jan 2017
Old 01-16-2017 , 11:18   Re: [Help] ZM class for vips
Reply With Quote #7

i tried but it gives errors

zp50_class_zombie_blink (3).sma(480) : error 017: undefined symbol "zp_get_user_next_class"
zp50_class_zombie_blink (3).sma(481) : error 017: undefined symbol "zp_set_user_zombie_class"
zp50_class_zombie_blink (3).sma(484) : error 001: expected token: "}", but found "-end of file-"


this is the full code of zm class

Code:
/*================================================================================
	
		****************************************************
		*********** [Zombie Plague Blink 1.2.0] ************
		****************************************************
	
	----------------------
	-*- Licensing Info -*-
	----------------------
	
	Zombie Plague Blink
	by schmurgel1983(@msn.com)
	Copyright (C) 2010-2011 Stefan "schmurgel1983" Focke
	
	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/>.
	
	In addition, as a special exception, the author gives permission to
	link the code of this program with the Half-Life Game Engine ("HL
	Engine") and Modified Game Libraries ("MODs") developed by Valve,
	L.L.C ("Valve"). You must obey the GNU General Public License in all
	respects for all of the code used other than the HL Engine and MODs
	from Valve. If you modify this file, you may extend this exception
	to your version of the file, but you are not obligated to do so. If
	you do not wish to do so, delete this exception statement from your
	version.
	
	No warranties of any kind. Use at your own risk.
	
	-------------------
	-*- Description -*-
	-------------------
	
	Teleport on high or low places are now for Zombies, after teleport
	u can't attack, and have a black screen so u don't see anything.
	The Teleport has the flashbang sound and special effects.
	A cooldown cvar controlled the blink so u don't can spam.
	
	---------------------
	-*- Configuration -*-
	---------------------
	
	zp_blink_cooldown 15.0 // Cooldown befor allow next blink
	zp_blink_no_atk_time 1.5 // how long can't attack after blink in seconds
	zp_blink_range 1234 // Maximum range from blink
	zp_blink_nemesis 0 // Allow nemesis to blink [0-disabled / 1-enabled]
	zp_blink_button 1 // wich button u push to blink [0-use / 1-reload]
	zp_blink_bots 1 // bots automatic blink [0-disabled / 1-enabled]
	
	--------------------
	-*- Requirements -*-
	--------------------
	
	* Mods: Counter-Strike 1.6 or Condition-Zero
	* AMXX: Version 1.8.0 or later
	* Module: fakemeta, hamsandwich
	
	-----------------
	-*- Changelog -*-
	-----------------
	
	* v1.0.0:
	   - Initial release Privat (9th Aug 2010)
	   - Initial release Alliedmodders (4th Feb 2011)
	
	* v1.1.0: (5th Feb 2011)
	   - Added: cvar to choose the teleport button,
	      bots are use now Teleport too
	
	* v1.2.0: (6th Feb 2011)
	   - Added: cvar to controlled the "no attack time"
	      after teleport
	
=================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <xs>

#if AMXX_VERSION_NUM < 180
	#assert AMX Mod X v1.8.0 or later library required!
#endif

#include <hamsandwich>

/*================================================================================
 [Zombie Plague 5.0 Includes]
=================================================================================*/

#include <zp50_class_zombie>
#define LIBRARY_NEMESIS "zp50_class_nemesis"
#include <zp50_class_nemesis>

/*================================================================================
 [Constants, Offsets, Macros]
=================================================================================*/

// Plugin Version
new const PLUGIN_VERSION[] = "1.2.0 (zp50)"

// Blick Zombie
new const zclass_name[] = { "Blink Zombie" }
new const zclass_info[] = { "HP- Knockback+++ Teleport" }
new const zclass_model[][] = { "zombie_source" }
new const zclass_clawmodel[][] = { "models/zombie_plague/v_knife_zombie.mdl" }
const zclass_health = 1500
const Float:zclass_speed = 0.77
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 2.0

// Ham weapon const
const OFFSET_WEAPONOWNER = 41
const OFFSET_LINUX_WEAPONS = 4

// Flashbang sound
new const SOUND_BLINK[] = { "weapons/flashbang-1.wav" }

// ScreenFade
const UNIT_SEC = 0x1000 // 1 second
const FFADE = 0x0000

/*================================================================================
 [Global Variables]
=================================================================================*/

// Player vars
new g_bBlink[33] // is Blink Zombie
new g_bAllowATK[33] // allow to attack
new Float:g_flNextBlink[33] // last blink time

// Game vars
new g_iBlinkIndex // index from the class
new g_iMaxPlayers // max player counter

// Message IDs vars
new g_msgSayText, g_msgScreenFade

// Sprites
new g_iShockwave, g_iFlare

// Cvar pointers
new cvar_Cooldown, cvar_Range, cvar_Nemesis,
cvar_Button, cvar_Bots, cvar_NoAttack

/*================================================================================
 [Precache and Init]
=================================================================================*/

public plugin_precache()
{
	register_plugin("[ZP] Zombie Class : Blink", PLUGIN_VERSION, "schmurgel1983")
	
	new index
	g_iBlinkIndex = zp_class_zombie_register(zclass_name, zclass_info, zclass_health, zclass_speed, zclass_gravity)
	zp_class_zombie_register_kb(g_iBlinkIndex, zclass_knockback)
	for (index = 0; index < sizeof zclass_model; index++)
		zp_class_zombie_register_model(g_iBlinkIndex, zclass_model[index])
	for (index = 0; index < sizeof zclass_clawmodel; index++)
		zp_class_zombie_register_claw(g_iBlinkIndex, zclass_clawmodel[index])
	
	g_iShockwave = precache_model( "sprites/shockwave.spr")
	g_iFlare = precache_model( "sprites/blueflare2.spr")
}
public plugin_init()
{
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_event("DeathMsg", "event_player_death", "a")
	
	RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fwd_Knife_Blink")
	RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fwd_Knife_Blink")
	
	register_forward(FM_CmdStart, "fwd_CmdStart")
	
	g_msgSayText = get_user_msgid("SayText")
	g_msgScreenFade = get_user_msgid("ScreenFade")
	
	cvar_Cooldown = register_cvar("zp_blink_cooldown", "15.0")
	cvar_NoAttack = register_cvar("zp_blink_no_atk_time", "1.5")
	cvar_Range = register_cvar("zp_blink_range", "1234")
	cvar_Nemesis = register_cvar("zp_blink_nemesis", "0")
	cvar_Button = register_cvar("zp_blink_button", "1")
	cvar_Bots = register_cvar("zp_blink_bots", "1")
	
	register_cvar("Blink_Zombie_version", PLUGIN_VERSION, FCVAR_SERVER|FCVAR_SPONLY)
	set_cvar_string("Blink_Zombie_version", PLUGIN_VERSION)
	
	g_iMaxPlayers = get_maxplayers()
}

public client_putinserver(id) reset_vars(id)

public client_disconnected(id) reset_vars(id)

public plugin_natives()
{
	set_module_filter("module_filter")
	set_native_filter("native_filter")
}

public module_filter(const module[])
{
	if (equal(module, LIBRARY_NEMESIS))
		return PLUGIN_HANDLED;
	
	return PLUGIN_CONTINUE;
}

public native_filter(const name[], index, trap)
{
	if (!trap)
		return PLUGIN_HANDLED;
	
	return PLUGIN_CONTINUE;
}

/*================================================================================
 [Main Forwards]
=================================================================================*/

public event_round_start()
{
	for (new id = 1; id <= g_iMaxPlayers; id++)
		reset_vars(id)
}

public event_player_death() reset_vars(read_data(2))

public fwd_Knife_Blink(ent)
{
	static owner
	owner = ham_cs_get_weapon_ent_owner(ent)
	
	if (!g_bBlink[owner] || g_bAllowATK[owner]) return HAM_IGNORED
	
	return HAM_SUPERCEDE
}

public fwd_CmdStart(id, handle)
{
	if (!g_bBlink[id] || !is_user_alive(id) || get_gametime() < g_flNextBlink[id]) return
	
	static button
	button = get_uc(handle, UC_Buttons)
	if (button & IN_USE && !get_pcvar_num(cvar_Button) || button & IN_RELOAD && get_pcvar_num(cvar_Button))
	{
		if (teleport(id))
		{
			emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM)
			
			g_bAllowATK[id] = false
			g_flNextBlink[id] = get_gametime() + get_pcvar_float(cvar_Cooldown)
			
			remove_task(id)
			set_task(get_pcvar_float(cvar_NoAttack), "allow_attack", id)
			set_task(get_pcvar_float(cvar_Cooldown), "show_blink", id)
		}
		else
		{
			g_flNextBlink[id] = get_gametime() + 1.0
			
			colored_print(id, "^x04[ZP]^x01 Found no reliable teleportation position.")
		}
	}
}

public zp_fw_core_cure_post(id) reset_vars(id)

public zp_fw_core_infect_post(id, attacker)
{
	if (zp_class_zombie_get_current(id) == g_iBlinkIndex)
	{
		if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_nemesis_get(id) && !get_pcvar_num(cvar_Nemesis)) return
		
		g_bBlink[id] = true
		g_bAllowATK[id] = true
		g_flNextBlink[id] = get_gametime()
		
		show_blink(id)
	}
}

/*================================================================================
 [Other Functions]
=================================================================================*/

public allow_attack(id)
{
	if (!is_user_connected(id)) return
	
	g_bAllowATK[id] = true
}

reset_vars(id)
{
	remove_task(id)
	g_bBlink[id] = false
	g_bAllowATK[id] = true
}

public show_blink(id)
{
	if (!is_user_connected(id) || !g_bBlink[id] || !is_user_alive(id)) return
	
	if (!get_pcvar_num(cvar_Button))
		colored_print(id, "^x04[Blink Zombie]^x01 Blink ability is ready. Press +use button.")
	else
		colored_print(id, "^x04[Blink Zombie]^x01 Blink ability is ready. Press +reload button.")
	
	// Bot support
	if (is_user_bot(id) && get_pcvar_num(cvar_Bots))
		set_task(random_float(1.0, 5.0), "bot_will_teleport", id)
}

public bot_will_teleport(id)
{
	if (!is_user_connected(id) || !g_bBlink[id] || !is_user_alive(id) || !is_user_bot(id)) return
	
	if (teleport(id))
	{
		emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM)
		
		g_bAllowATK[id] = false
		
		remove_task(id)
		set_task(get_pcvar_float(cvar_NoAttack), "allow_attack", id)
		set_task(get_pcvar_float(cvar_Cooldown), "show_blink", id)
	}
	else
	{
		set_task(random_float(1.0, 3.0), "bot_will_teleport", id)
	}
}

bool:teleport(id)
{
	new	Float:vOrigin[3], Float:vNewOrigin[3],
	Float:vNormal[3], Float:vTraceDirection[3],
	Float:vTraceEnd[3]
	
	pev(id, pev_origin, vOrigin)
	
	velocity_by_aim(id, get_pcvar_num(cvar_Range), vTraceDirection)
	xs_vec_add(vTraceDirection, vOrigin, vTraceEnd)
	
	engfunc(EngFunc_TraceLine, vOrigin, vTraceEnd, DONT_IGNORE_MONSTERS, id, 0)
	
	new Float:flFraction
	get_tr2(0, TR_flFraction, flFraction)
	if (flFraction < 1.0)
	{
		get_tr2(0, TR_vecEndPos, vTraceEnd)
		get_tr2(0, TR_vecPlaneNormal, vNormal)
	}
	
	xs_vec_mul_scalar(vNormal, 40.0, vNormal) // do not decrease the 40.0
	xs_vec_add(vTraceEnd, vNormal, vNewOrigin)
	
	if (is_player_stuck(id, vNewOrigin))
		return false;
	
	emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM)
	tele_effect(vOrigin)
	
	engfunc(EngFunc_SetOrigin, id, vNewOrigin)
	
	tele_effect(vNewOrigin)
	tele_effect2(vNewOrigin)
	
	emessage_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, _, id)
	ewrite_short(floatround(UNIT_SEC*get_pcvar_float(cvar_NoAttack)))
	ewrite_short(floatround(UNIT_SEC*get_pcvar_float(cvar_NoAttack)))
	ewrite_short(FFADE)
	ewrite_byte(0)
	ewrite_byte(0)
	ewrite_byte(0)
	ewrite_byte(255)
	emessage_end()
	
	return true;
}

colored_print(target, const message[], any:...)
{
	static buffer[512]
	
	vformat(buffer, charsmax(buffer), message, 3)
	
	message_begin(MSG_ONE, g_msgSayText, _, target)
	write_byte(target)
	write_string(buffer)
	message_end()
}

/*================================================================================
 [Stocks]
=================================================================================*/

stock is_player_stuck(id, Float:originF[3])
{
	engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0)
	
	if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
		return true;
	
	return false;
}

stock ham_cs_get_weapon_ent_owner(entity)
{
	if (pev_valid(entity) != 2)
		return 0;
	
	return get_pdata_cbase(entity, OFFSET_WEAPONOWNER, OFFSET_LINUX_WEAPONS);
}

stock tele_effect(const Float:torigin[3])
{
	new origin[3]
	origin[0] = floatround(torigin[0])
	origin[1] = floatround(torigin[1])
	origin[2] = floatround(torigin[2])
	
	message_begin(MSG_PAS, SVC_TEMPENTITY, origin)
	write_byte(TE_BEAMCYLINDER)
	write_coord(origin[0])
	write_coord(origin[1])
	write_coord(origin[2]+10)
	write_coord(origin[0])
	write_coord(origin[1])
	write_coord(origin[2]+60)
	write_short(g_iShockwave)
	write_byte(0)
	write_byte(0)
	write_byte(3)
	write_byte(60)
	write_byte(0)
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(255)
	write_byte(0)
	message_end()
}

stock tele_effect2(const Float:torigin[3])
{
	new origin[3]
	origin[0] = floatround(torigin[0])
	origin[1] = floatround(torigin[1])
	origin[2] = floatround(torigin[2])
	
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(TE_SPRITETRAIL)
	write_coord(origin[0])
	write_coord(origin[1])
	write_coord(origin[2]+40)
	write_coord(origin[0])
	write_coord(origin[1])
	write_coord(origin[2])
	write_short(g_iFlare)
	write_byte(30)
	write_byte(10)
	write_byte(1)
	write_byte(50)
	write_byte(10)
	message_end()
}
public zp_user_infected_pre(id) { 
    if(!(get_user_flags(id) & ADMIN_LEVEL_H)) { 
        if (zp_get_user_next_class(id) == g_iBlinkIndex) {
            zp_set_user_zombie_class(id, 0) 
            client_print(id, print_center, "Your selected class in only for *VIP* members") 
}









Quote:
Originally Posted by edon1337 View Post
That's 1.7.2 my dude. Don't you see the #define VERSION "1.7.2" ?
Steps to make a ZM class for 1.7.2

PHP Code:
#include <zmvip> // this at the include list

public zp_user_infected_pre(id) { // at the end of the code
    
if(!(get_user_flags(id) & ADMIN_LEVEL_H)) { 
        if (
zp_get_user_next_class(id) == g_zclass_crow) { // replace g_zclass_crow with your ZM class id
            
zp_set_user_zombie_class(id0
            
client_print(idprint_center"Your selected class in only for *VIP* members"
        }     
    } 

About Class ID , you can find it by searching for zp_register_zombie_class in your code

Example : lusty_rose = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)

here the Class ID is lusty_rose

Normal Lusty Rose :
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <zombieplague>

#define PLUGIN "CSO Lusty Rose"
#define VERSION "1.0.1"
#define AUTHOR ""

new const zclass_name[] = "Light"
new const zclass_info[] = "Press G To Stealth"
new const zclass_model[] = "cosspeed1_origin"
new const zclass_clawmodel[] = "v_knife_cosspeed1.mdl"
new const zclass_clawmodel_invi[] = "models/zombie_plague/v_knife_cosspeed1_inv.mdl"
const zclass_health 3500
const zclass_speed 295
const Float:zclass_gravity 0.7
const Float:zclass_knockback 6.0

new const zombie_sound_invisible[] = "zombie_plague/zombi_pressure_female.wav"

new lusty_rose
const Float:invisible_time 10.0
const Float:invisible_timewait 10.0
const invisible_dmg 200
const Float:invisible_speed 215.0
const Float:invisible_gravity 0.9
const invisible_alpha 10

new g_invisible[33], g_invisible_wait[33]

new 
g_msgSayText
new g_maxplayers
new g_roundend

enum 
(+= 100)
{
    
TASK_INVISIBLE 2000,
    
TASK_WAIT_INVISIBLE,
    
TASK_INVISIBLE_SOUND,
    
TASK_BOT_USE_SKILL
}

#define ID_INVISIBLE (taskid - TASK_INVISIBLE)
#define ID_WAIT_INVISIBLE (taskid - TASK_WAIT_INVISIBLE)
#define ID_INVISIBLE_SOUND (taskid - TASK_INVISIBLE_SOUND)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_event("DeathMsg""Death""a")
    
register_event("CurWeapon""EventCurWeapon""be""1=1")
    
register_logevent("logevent_round_end"2"1=Round_End")
    
    
register_clcmd("drop""cmd_invisible")
    
    
g_msgSayText get_user_msgid("SayText")
    
g_maxplayers get_maxplayers()
}

public 
plugin_precache()
{
    
precache_model(zclass_clawmodel_invi)
    
precache_sound(zombie_sound_invisible)
    
    
lusty_rose zp_register_zombie_class(zclass_namezclass_infozclass_model

zclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
client_putinserver(id)
{
    
reset_value_player(id)
}

public 
client_disconnect(id)
{
    
reset_value_player(id)
}

public 
event_round_start()
{
    
g_roundend 0
    
    
for (new id=1id<=g_maxplayersid++)
    {
        if (!
is_user_connected(id)) continue;
        
        
reset_value_player(id)
    }
}

public 
logevent_round_end()
{
    
g_roundend 1
}

public 
Death()
{
    new 
victim read_data(2
    
reset_value_player(victim)
}

public 
EventCurWeapon(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE;
    
    if(
g_invisible[id]) set_user_maxspeed(idinvisible_speed);
    
    return 
PLUGIN_CONTINUE;
}

public 
zp_user_infected_post(id)
{
    
reset_value_player(id)
    
    if(
zp_get_user_nemesis(id)) return;
    
    if(
zp_get_user_zombie_class(id) == lusty_rose)
    {
        if(
is_user_bot(id))
        {
            
set_task(random_float(5.0,15.0), "bot_use_skill"id

+TASK_BOT_USE_SKILL)
            return
        }
        
        
zp_colored_print(id"^x04[ZP]^x01 Your skill is^x04 Stealth^x01. 

Cooldown^x04 %.1f ^x01seconds."
invisible_timewait)
    }
}

public 
zp_user_humanized_post(id)
{
    
reset_value_player(id)
}

public 
zp_user_unfrozen(id)
{
    if(
g_invisible[id])
    {
        
set_user_rendering(id,kRenderFxGlowShell,20,20,20,kRenderTransAlpha

invisible_alpha)
        
set_user_maxspeed(idinvisible_speed)
        
set_user_gravity(idinvisible_gravity)
    }
}

public 
cmd_invisible(id)
{
    if (
g_roundend) return PLUGIN_CONTINUE
    
    
if (!is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id)) return 

PLUGIN_CONTINUE

    
new health get_user_health(id) - invisible_dmg
    
if (zp_get_user_zombie_class(id) == lusty_rose && health>&& !g_invisible[id] && !

g_invisible_wait[id])
    {
        
g_invisible[id] = 1
        
        set_wpnmodel
(id)
        
set_user_health(idhealth)
        
set_user_rendering(id,kRenderFxGlowShell,20,20,20,kRenderTransAlpha

invisible_alpha)
        
set_user_footsteps(id1)
        
set_user_maxspeed(idinvisible_speed)
        
set_user_gravity(idinvisible_gravity)
        
PlayEmitSound(idzombie_sound_invisible)
        
        
set_task(invisible_time"RemoveInvisible"id+TASK_INVISIBLE)
        
set_task(2.0"InvisibleSound"id+TASK_INVISIBLE_SOUND__"b")

        
zp_colored_print(id"^x04[ZP]^x01 You will^x04 Stealth^x01 for^x04 %.1f 

^x01seconds."
invisible_time)
        
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE
}

public 
bot_use_skill(taskid)
{
    new 
id ID_BOT_USE_SKILL
    
    
if (!is_user_alive(id)) return;

    
cmd_invisible(id)
    
    
set_task(random_float(5.0,15.0), "bot_use_skill"id+TASK_BOT_USE_SKILL)
}

public 
InvisibleSound(taskid)
{
    new 
id ID_INVISIBLE_SOUND
    
    
if (g_invisible[id]) PlayEmitSound(idzombie_sound_invisible)
    else 
remove_task(taskid)
}

public 
RemoveInvisible(taskid)
{
    new 
id ID_INVISIBLE
    
    g_invisible
[id] = 0
    
    set_wpnmodel
(id)
    
set_user_rendering(id)
    
set_user_footsteps(id0)
    
set_user_maxspeed(idfloat(zclass_speed))
    
set_user_gravity(idzclass_gravity)
    
zp_colored_print(id"^x04[ZP]^x01 Your^x04 Stealth^x01 skill is over.")
    
    
g_invisible_wait[id] = 1
    
    set_task
(invisible_timewait"RemoveWaitInvisible"id+TASK_WAIT_INVISIBLE)
}

public 
RemoveWaitInvisible(taskid)
{
    new 
id ID_WAIT_INVISIBLE
    
    g_invisible_wait
[id] = 0
    
    zp_colored_print
(id"^x04[ZP]^x01 Your skill^x04 Stealth^x01 is ready.")
}

set_wpnmodel(id)
{
    if (!
is_user_alive(id)) return;
    
    if (
get_user_weapon(id) == CSW_KNIFE)
    {
        if (
g_invisible[id])
        {
            
set_pev(idpev_viewmodel2zclass_clawmodel_invi)
        }
        else
        {
            static 
temp[100]
            
format(tempcharsmax(temp), "models/zombie_plague/%s"

zclass_clawmodel)
            
set_pev(idpev_viewmodel2temp)
        }
    }    
}

PlayEmitSound(id, const sound[])
{
    
emit_sound(idCHAN_VOICEsound1.0ATTN_NORM0PITCH_NORM)
}

reset_value_player(id)
{
    
g_invisible[id] = 0
    g_invisible_wait
[id] = 0
    
    remove_task
(id+TASK_INVISIBLE)
    
remove_task(id+TASK_WAIT_INVISIBLE)
    
remove_task(id+TASK_BOT_USE_SKILL)
}

zp_colored_print(target, const message[], any:...)
{
    static 
buffer[512], iargscount
    argscount 
numargs()
    
    if (!
target)
    {
        static 
player
        
for (player 1player <= g_maxplayersplayer++)
        {
            if (!
is_user_connected(player))
                continue;
            
            static 
changed[5], changedcount
            changedcount 
0
            
            
for (2argscounti++)
            {
                if (
getarg(i) == LANG_PLAYER)
                {
                    
setarg(i0player)
                    
changed[changedcount] = i
                    changedcount
++
                }
            }
            
            
vformat(buffercharsmax(buffer), message3)
            
            
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_player)
            
write_byte(player)
            
write_string(buffer)
            
message_end()
            
            for (
0changedcounti++)
                
setarg(changed[i], 0LANG_PLAYER)
        }
    }
    else
    {
        
vformat(buffercharsmax(buffer), message3)
        
        
message_begin(MSG_ONEg_msgSayText_target)
        
write_byte(target)
        
write_string(buffer)
        
message_end()
    }

VIP Lusty Rose :
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <zombieplague>
#include <zmvip>

#define PLUGIN "CSO Lusty Rose"
#define VERSION "1.0.1"
#define AUTHOR ""

new const zclass_name[] = "Light"
new const zclass_info[] = "Press G To Stealth"
new const zclass_model[] = "cosspeed1_origin"
new const zclass_clawmodel[] = "v_knife_cosspeed1.mdl"
new const zclass_clawmodel_invi[] = "models/zombie_plague/v_knife_cosspeed1_inv.mdl"
const zclass_health 3500
const zclass_speed 295
const Float:zclass_gravity 0.7
const Float:zclass_knockback 6.0

new const zombie_sound_invisible[] = "zombie_plague/zombi_pressure_female.wav"

new lusty_rose
const Float:invisible_time 10.0
const Float:invisible_timewait 10.0
const invisible_dmg 200
const Float:invisible_speed 215.0
const Float:invisible_gravity 0.9
const invisible_alpha 10

new g_invisible[33], g_invisible_wait[33]

new 
g_msgSayText
new g_maxplayers
new g_roundend

enum 
(+= 100)
{
    
TASK_INVISIBLE 2000,
    
TASK_WAIT_INVISIBLE,
    
TASK_INVISIBLE_SOUND,
    
TASK_BOT_USE_SKILL
}

#define ID_INVISIBLE (taskid - TASK_INVISIBLE)
#define ID_WAIT_INVISIBLE (taskid - TASK_WAIT_INVISIBLE)
#define ID_INVISIBLE_SOUND (taskid - TASK_INVISIBLE_SOUND)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_event("DeathMsg""Death""a")
    
register_event("CurWeapon""EventCurWeapon""be""1=1")
    
register_logevent("logevent_round_end"2"1=Round_End")
    
    
register_clcmd("drop""cmd_invisible")
    
    
g_msgSayText get_user_msgid("SayText")
    
g_maxplayers get_maxplayers()
}

public 
plugin_precache()
{
    
precache_model(zclass_clawmodel_invi)
    
precache_sound(zombie_sound_invisible)
    
    
lusty_rose zp_register_zombie_class(zclass_namezclass_infozclass_model

zclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
client_putinserver(id)
{
    
reset_value_player(id)
}

public 
client_disconnect(id)
{
    
reset_value_player(id)
}

public 
event_round_start()
{
    
g_roundend 0
    
    
for (new id=1id<=g_maxplayersid++)
    {
        if (!
is_user_connected(id)) continue;
        
        
reset_value_player(id)
    }
}

public 
logevent_round_end()
{
    
g_roundend 1
}

public 
Death()
{
    new 
victim read_data(2
    
reset_value_player(victim)
}

public 
EventCurWeapon(id)
{
    if(!
is_user_alive(id)) return PLUGIN_CONTINUE;
    
    if(
g_invisible[id]) set_user_maxspeed(idinvisible_speed);
    
    return 
PLUGIN_CONTINUE;
}

public 
zp_user_infected_post(id)
{
    
reset_value_player(id)
    
    if(
zp_get_user_nemesis(id)) return;
    
    if(
zp_get_user_zombie_class(id) == lusty_rose)
    {
        if(
is_user_bot(id))
        {
            
set_task(random_float(5.0,15.0), "bot_use_skill"id

+TASK_BOT_USE_SKILL)
            return
        }
        
        
zp_colored_print(id"^x04[ZP]^x01 Your skill is^x04 Stealth^x01. 

Cooldown^x04 %.1f ^x01seconds."
invisible_timewait)
    }
}

public 
zp_user_humanized_post(id)
{
    
reset_value_player(id)
}

public 
zp_user_unfrozen(id)
{
    if(
g_invisible[id])
    {
        
set_user_rendering(id,kRenderFxGlowShell,20,20,20,kRenderTransAlpha

invisible_alpha)
        
set_user_maxspeed(idinvisible_speed)
        
set_user_gravity(idinvisible_gravity)
    }
}

public 
cmd_invisible(id)
{
    if (
g_roundend) return PLUGIN_CONTINUE
    
    
if (!is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id)) return 

PLUGIN_CONTINUE

    
new health get_user_health(id) - invisible_dmg
    
if (zp_get_user_zombie_class(id) == lusty_rose && health>&& !g_invisible[id] && !

g_invisible_wait[id])
    {
        
g_invisible[id] = 1
        
        set_wpnmodel
(id)
        
set_user_health(idhealth)
        
set_user_rendering(id,kRenderFxGlowShell,20,20,20,kRenderTransAlpha

invisible_alpha)
        
set_user_footsteps(id1)
        
set_user_maxspeed(idinvisible_speed)
        
set_user_gravity(idinvisible_gravity)
        
PlayEmitSound(idzombie_sound_invisible)
        
        
set_task(invisible_time"RemoveInvisible"id+TASK_INVISIBLE)
        
set_task(2.0"InvisibleSound"id+TASK_INVISIBLE_SOUND__"b")

        
zp_colored_print(id"^x04[ZP]^x01 You will^x04 Stealth^x01 for^x04 %.1f 

^x01seconds."
invisible_time)
        
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_CONTINUE
}

public 
bot_use_skill(taskid)
{
    new 
id ID_BOT_USE_SKILL
    
    
if (!is_user_alive(id)) return;

    
cmd_invisible(id)
    
    
set_task(random_float(5.0,15.0), "bot_use_skill"id+TASK_BOT_USE_SKILL)
}

public 
InvisibleSound(taskid)
{
    new 
id ID_INVISIBLE_SOUND
    
    
if (g_invisible[id]) PlayEmitSound(idzombie_sound_invisible)
    else 
remove_task(taskid)
}

public 
RemoveInvisible(taskid)
{
    new 
id ID_INVISIBLE
    
    g_invisible
[id] = 0
    
    set_wpnmodel
(id)
    
set_user_rendering(id)
    
set_user_footsteps(id0)
    
set_user_maxspeed(idfloat(zclass_speed))
    
set_user_gravity(idzclass_gravity)
    
zp_colored_print(id"^x04[ZP]^x01 Your^x04 Stealth^x01 skill is over.")
    
    
g_invisible_wait[id] = 1
    
    set_task
(invisible_timewait"RemoveWaitInvisible"id+TASK_WAIT_INVISIBLE)
}

public 
RemoveWaitInvisible(taskid)
{
    new 
id ID_WAIT_INVISIBLE
    
    g_invisible_wait
[id] = 0
    
    zp_colored_print
(id"^x04[ZP]^x01 Your skill^x04 Stealth^x01 is ready.")
}

set_wpnmodel(id)
{
    if (!
is_user_alive(id)) return;
    
    if (
get_user_weapon(id) == CSW_KNIFE)
    {
        if (
g_invisible[id])
        {
            
set_pev(idpev_viewmodel2zclass_clawmodel_invi)
        }
        else
        {
            static 
temp[100]
            
format(tempcharsmax(temp), "models/zombie_plague/%s"

zclass_clawmodel)
            
set_pev(idpev_viewmodel2temp)
        }
    }    
}

PlayEmitSound(id, const sound[])
{
    
emit_sound(idCHAN_VOICEsound1.0ATTN_NORM0PITCH_NORM)
}

reset_value_player(id)
{
    
g_invisible[id] = 0
    g_invisible_wait
[id] = 0
    
    remove_task
(id+TASK_INVISIBLE)
    
remove_task(id+TASK_WAIT_INVISIBLE)
    
remove_task(id+TASK_BOT_USE_SKILL)
}

zp_colored_print(target, const message[], any:...)
{
    static 
buffer[512], iargscount
    argscount 
numargs()
    
    if (!
target)
    {
        static 
player
        
for (player 1player <= g_maxplayersplayer++)
        {
            if (!
is_user_connected(player))
                continue;
            
            static 
changed[5], changedcount
            changedcount 
0
            
            
for (2argscounti++)
            {
                if (
getarg(i) == LANG_PLAYER)
                {
                    
setarg(i0player)
                    
changed[changedcount] = i
                    changedcount
++
                }
            }
            
            
vformat(buffercharsmax(buffer), message3)
            
            
message_begin(MSG_ONE_UNRELIABLEg_msgSayText_player)
            
write_byte(player)
            
write_string(buffer)
            
message_end()
            
            for (
0changedcounti++)
                
setarg(changed[i], 0LANG_PLAYER)
        }
    }
    else
    {
        
vformat(buffercharsmax(buffer), message3)
        
        
message_begin(MSG_ONEg_msgSayText_target)
        
write_byte(target)
        
write_string(buffer)
        
message_end()
    }
}

public 
zp_user_infected_pre(id) { 
    if(!(
get_user_flags(id) & ADMIN_LEVEL_H)) { 
        if (
zp_get_user_next_class(id) == lusty_rose) { 
            
zp_set_user_zombie_class(id0
            
client_print(idprint_center"Your selected class in only for *VIP* members"
        }     
    } 

CoolPad is offline
 



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:42.


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