Raised This Month: $ Target: $400
 0% 

[ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)


Post New Thread Closed Thread   
 
Thread Tools Display Modes
wisam187
Senior Member
Join Date: Jan 2011
Location: In My Own World
Old 01-28-2011 , 04:59   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#11

hahaha... ok thx
__________________
If you fail to plan..... you plan to fail.

the real mistake is the one which we dont learn from it
wisam187 is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 01-29-2011 , 21:25   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#12

Nothing to thank me
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 02-17-2011 , 18:11   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#13

Update....
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Hab
Junior Member
Join Date: Nov 2009
Old 02-19-2011 , 15:03   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#14

There's a bug: humans cannot drop their weapons
Code:
/*================================================================================
Name: Lockerz Zombie
Type: Zombie Class
For: Zombie Plague 4.3
Author: Dias Leon
Credits:
- Dias | Made Plugin
- Hab | Weapon Drop Bugfix
================================================================================*/

#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <zombieplague>

// Zombie Attributes
new const zclass_name[] = "Lockerz Zombie" // name
new const zclass_info[] = "(G) - Lock Human Weapon" // description
new const zclass_model[] = "zombie_source" // model
new const zclass_clawmodel[] = "v_knife_zombie.mdl" // claw model
const zclass_health = 750 // health
const zclass_speed = 250 // speed
const Float:zclass_gravity = 1.0 // gravity
const Float:zclass_knockback = 1.0 // knockback

// Class IDs
new g_lockerz

// Main var
new beam
new bool:can_lock[33]
new bool:target_locked[33]

// Main cvar
new cvar_distance
new cvar_cooldown
new cvar_cooldown_target

public plugin_init()
{
	register_plugin("[ZP] Zombie Class: Lockerz Zombie", "1.1", "Dias Leon")
	register_clcmd("drop", "lock_now")
	register_forward(FM_CmdStart, "fw_Start")
	cvar_distance = register_cvar("lz_distance", "750")
	cvar_cooldown = register_cvar("lz_cooldown_time", "30.0")
	cvar_cooldown_target = register_cvar("lz_cooldown_target_time", "10.0")
}

public plugin_precache()
{
	g_lockerz = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
	beam = precache_model("sprites/lgtning.spr")
}

public zp_user_infected_post(id, infector)
{
	if(is_user_alive(id) && zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_lockerz)
	{
		client_print(id, print_chat, "[Lockerz Zombie] Aim the player you want to block that him weapon, And Press (G) !!!")
		can_lock[id] = true
	}
}

public zp_user_humanized_post(id)
{
	if(is_user_alive(id) && zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_lockerz)
	{
		can_lock[id] = false
	}
}

public lock_now(id)
{
	if(is_user_alive(id) && zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_lockerz)
	{
		if(is_user_alive(id) && can_lock[id] == true)
		{
			new target1, body1
			static Float:start1[3]
			static Float:end1[3]

			pev(id, pev_origin, start1)
			start1[2] += 16.0
			fm_get_aim_origin(id, end1)
			end1[2] += 16.0

			get_user_aiming(id, target1, body1, cvar_distance)
			if(is_user_alive(target1) && !zp_get_user_zombie(target1) && !zp_get_user_survivor(target1))
			{
				lock_target(target1)
				client_print(id, print_center, "Target Locked [Hit]")
				} else {
				client_print(id, print_center, "Target not Locked [Miss]")
			}
			message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
			write_byte(0)
			engfunc(EngFunc_WriteCoord, start1[0])
			engfunc(EngFunc_WriteCoord, start1[1])
			engfunc(EngFunc_WriteCoord, start1[2])
			engfunc(EngFunc_WriteCoord, end1[0])
			engfunc(EngFunc_WriteCoord, end1[1])
			engfunc(EngFunc_WriteCoord, end1[2])
			write_short(beam)
			write_byte(0)
			write_byte(30)
			write_byte(20)
			write_byte(50)
			write_byte(50)
			write_byte(255)
			write_byte(255)
			write_byte(255)
			write_byte(100)
			write_byte(50)
			message_end()

			can_lock[id] = false
			set_task(get_pcvar_float(cvar_cooldown), "ability_reload", id)
			} else {
			if(is_user_alive(id) && can_lock[id] == false)
			{
				client_print(id, print_chat, "[Lockerz Zombie] You can't use your ability right now. Please waiting for %i", get_pcvar_num(cvar_cooldown))
			}
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public lock_target(id)
{
	target_locked[id] = true

	set_task(get_pcvar_float(cvar_cooldown_target), "unlock_target", id)
	client_print(id, print_chat, "Your all weapon are locked, Now you can't fire. Please waiting for %i", get_pcvar_num(cvar_cooldown_target))

	return PLUGIN_HANDLED
}

public ability_reload(id)
{
	can_lock[id] = true
	client_print(id, print_chat, "[Lockerz Zombie] Now. You can use your ability, Press (G)")
}

public unlock_target(id)
{
	target_locked[id] = false
	client_print(id, print_chat, "Your all weapon are UnLock, Now you can fire")

	return PLUGIN_HANDLED
}

public fw_Start(id, uc_handle, seed)
{
	if(is_user_alive(id) && target_locked[id] == true)
	{
		new button = get_uc(uc_handle,UC_Buttons)
		if(button & IN_ATTACK || button & IN_ATTACK2)
		{
			set_uc(uc_handle,UC_Buttons,(button & ~IN_ATTACK) & ~IN_ATTACK2)
		}
	}
}
Download zp_zclass_lockerz.sma
Attached Files
File Type: sma Get Plugin or Get Source (zp_zclass_lockerz.sma - 468 views - 4.5 KB)

Last edited by Hab; 02-19-2011 at 17:57.
Hab is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 02-19-2011 , 20:13   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#15

Oh Thank you
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
Papa Doc
New Member
Join Date: Feb 2011
Old 02-20-2011 , 13:16   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#16

Thank for the zombie class it`s really great...but i wanna ask you something...could you edit the plugin so it won't lock AWP(Magnum Sniper Rifle) because i have a mod SNIPER and i really don`t want zombie to block that weapon...thanks!!!
Papa Doc is offline
dias
BANNED
Join Date: Jul 2009
Location: South Vietnam
Old 02-20-2011 , 18:14   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#17

oh sorry. This Zombie class doesn't support Zombie Plague Advance. So i can't block that weapon
dias is offline
Send a message via Yahoo to dias Send a message via Skype™ to dias
lauty17
Member
Join Date: Nov 2010
Old 02-22-2011 , 14:06   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#18

and the images??
lauty17 is offline
Se7ven
Senior Member
Join Date: Feb 2011
Location: Romania
Old 03-20-2011 , 11:25   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#19

Muhahaa this class rulz thanks for sharing
I use it very much xD
__________________
WwW.HighCS.Ro From Romania For You
Se7ven is offline
Send a message via AIM to Se7ven Send a message via Yahoo to Se7ven
dfwu.dark
Senior Member
Join Date: Mar 2011
Location: In dreams...
Old 03-22-2011 , 13:24   Re: [ZP] Zombie Class: Lockerz Zombie (Lock Human Weapon)
#20

Nice Class...
dfwu.dark is offline
Send a message via Skype™ to dfwu.dark
Closed Thread



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 15:41.


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