Discord sunucumuz açılmıştır, hepinizi bekleriz

https://discord.gg/43gGDQe6tS

Duman özelliği olan zombi

Eklenti sorunlarınız ve özel eklenti istekleriniz

Moderatör: Moderatörler


Konu Sahibi
DarkWorldzZ
Mesajlar: 99
Kayıt: Cmt Eki 21, 2017 2:12 pm
Clan İsmi: ~ Dark World'Z~

Duman özelliği olan zombi

Mesaj gönderen DarkWorldzZ »

merhaba arkadaşlar
Duman özelliğini kullanan zombi vardı elimde vardı kaybettim acaba olan varsa
paylaşabilirmi

Link:
Linklerini gizle
Linki Kopyala

TheAsTeRiX
Mesajlar: 718
Kayıt: Cmt Oca 14, 2017 5:30 pm
Konum: Makedonya
Clan İsmi: Skull Gaming

Duman özelliği olan zombi

Mesaj gönderen TheAsTeRiX »

Kod: Tümünü seç

#include <amxmodx>
#include <fakemeta>
#include <zombieplaguee>

#define PLUGIN "NST Zombie Class Pc"
#define VERSION "1.0"
#define AUTHOR "NST"

new const zclass_name[] = "Pisiko Zombi"
new const zclass_info[] = "Ayarli"
new const zclass_model[] = "pc_zombi_host"
new const zclass_clawmodel[] = "v_knife_pc_zombi.mdl"
const zclass_health = 6000
const zclass_speed = 260
const Float:zclass_gravity = 0.8
const Float:zclass_knockback = 2.5

new idclass
const Float:smoke_time = 10.0
const Float:smoke_timewait = 10.0
const smoke_size = 4

new const sound_smoke[] = "zombie_plague/zombi_smoke.wav"
new idsprites_smoke

new g_smoke[33], g_smoke_wait[33], Float:g_smoke_origin[33][3]

new g_msgSayText
new g_maxplayers
new g_roundend

enum (+= 100)
{
	TASK_SMOKE = 2000,
	TASK_SMOKE_EXP,
	TASK_WAIT_SMOKE,
	TASK_BOT_USE_SKILL
}

#define ID_SMOKE (taskid - TASK_SMOKE)
#define ID_SMOKE_EXP (taskid - TASK_SMOKE_EXP)
#define ID_WAIT_SMOKE (taskid - TASK_WAIT_SMOKE)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_event("DeathMsg", "Death", "a")
	register_logevent("logevent_round_end", 2, "1=Round_End")
	
	register_clcmd("drop", "cmd_smoke")

	g_msgSayText = get_user_msgid("SayText")
	g_maxplayers = get_maxplayers()
}

public plugin_precache()
{
	idsprites_smoke = precache_model("sprites/zb_smoke.spr")
	
	precache_sound(sound_smoke)
	
	idclass = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_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=1; id<=g_maxplayers; id++)
	{
		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 zp_user_infected_post(id)
{
	reset_value_player(id)
	
	if(zp_get_user_nemesis(id)) return;
	
	if(zp_get_user_zombie_class(id) == idclass)
	{
		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[ZE]^x04 Smoking^x01 Yetenegin ^x04 %.1f ^x01Saniye Sonra Aktif.", smoke_timewait)
	}
}

public zp_user_humanized_post(id)
{
	reset_value_player(id)
}

public cmd_smoke(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

	if (zp_get_user_zombie_class(id) == idclass && !g_smoke[id] && !g_smoke_wait[id])
	{
		g_smoke[id] = 1
		
		pev(id,pev_origin,g_smoke_origin[id])
		
		set_task(0.1, "SmokeExplode", id+TASK_SMOKE_EXP)
		
		PlaySound(id, sound_smoke)
		
		set_task(smoke_time, "RemoveSmoke", id+TASK_SMOKE)
		
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

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

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

public SmokeExplode(taskid)
{
	new id = ID_SMOKE_EXP
	
	if (!g_smoke[id])
	{
		remove_task(id+TASK_SMOKE_EXP)
		return;
	}
	
	new Float:origin[3]
	origin[0] = g_smoke_origin[id][0]
	origin[1] = g_smoke_origin[id][1]
	origin[2] = g_smoke_origin[id][2]
	
	new flags = pev(id, pev_flags)
	if (!((flags & FL_DUCKING) && (flags & FL_ONGROUND)))
		origin[2] -= 36.0
	
	Create_Smoke_Group(origin)
	set_task(1.0, "SmokeExplode", id+TASK_SMOKE_EXP)
	
	return;
}

public RemoveSmoke(taskid)
{
	new id = ID_SMOKE
	
	g_smoke[id] = 0
	g_smoke_wait[id] = 1
	
	set_task(smoke_timewait, "RemoveWaitSmoke", id+TASK_WAIT_SMOKE)
}

public RemoveWaitSmoke(taskid)
{
	new id = ID_WAIT_SMOKE
	
	g_smoke_wait[id] = 0
	
	zp_colored_print(id, "^x04[ZP]^x04 Smoking^x01 Yetenegin Aktif.")
}

PlaySound(id, const sound[])
{
	client_cmd(id, "spk ^"%s^"", sound)
}

Create_Smoke_Group(Float:position[3])
{
	new Float:origin[12][3]
	get_spherical_coord(position, 40.0, 0.0, 0.0, origin[0])
	get_spherical_coord(position, 40.0, 90.0, 0.0, origin[1])
	get_spherical_coord(position, 40.0, 180.0, 0.0, origin[2])
	get_spherical_coord(position, 40.0, 270.0, 0.0, origin[3])
	get_spherical_coord(position, 100.0, 0.0, 0.0, origin[4])
	get_spherical_coord(position, 100.0, 45.0, 0.0, origin[5])
	get_spherical_coord(position, 100.0, 90.0, 0.0, origin[6])
	get_spherical_coord(position, 100.0, 135.0, 0.0, origin[7])
	get_spherical_coord(position, 100.0, 180.0, 0.0, origin[8])
	get_spherical_coord(position, 100.0, 225.0, 0.0, origin[9])
	get_spherical_coord(position, 100.0, 270.0, 0.0, origin[10])
	get_spherical_coord(position, 100.0, 315.0, 0.0, origin[11])
	
	for (new i = 0; i < smoke_size; i++)
		create_Smoke(origin[i], idsprites_smoke, 100, 0)
}

create_Smoke(const Float:position[3], sprite_index, life, framerate)
{
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(TE_SMOKE)
	engfunc(EngFunc_WriteCoord, position[0])
	engfunc(EngFunc_WriteCoord, position[1])
	engfunc(EngFunc_WriteCoord, position[2])
	write_short(sprite_index)
	write_byte(life)
	write_byte(framerate)
	message_end()
}

get_spherical_coord(const Float:ent_origin[3], Float:redius, Float:level_angle, Float:vertical_angle, Float:origin[3])
{
	new Float:length
	length  = redius * floatcos(vertical_angle, degrees)
	origin[0] = ent_origin[0] + length * floatcos(level_angle, degrees)
	origin[1] = ent_origin[1] + length * floatsin(level_angle, degrees)
	origin[2] = ent_origin[2] + redius * floatsin(vertical_angle, degrees)
}

reset_value_player(id)
{
	g_smoke[id] = 0
	g_smoke_wait[id] = 0
	
	remove_task(id+TASK_SMOKE)
	remove_task(id+TASK_WAIT_SMOKE)
	remove_task(id+TASK_SMOKE_EXP)
	remove_task(id+TASK_BOT_USE_SKILL)
}

zp_colored_print(target, const message[], any:...)
{
	static buffer[512], i, argscount
	argscount = numargs()
	
	if (!target)
	{
		static player
		for (player = 1; player <= g_maxplayers; player++)
		{
			if (!is_user_connected(player))
				continue;
			
			static changed[5], changedcount
			changedcount = 0
			
			for (i = 2; i < argscount; i++)
			{
				if (getarg(i) == LANG_PLAYER)
				{
					setarg(i, 0, player)
					changed[changedcount] = i
					changedcount++
				}
			}
			
			vformat(buffer, charsmax(buffer), message, 3)
			
			message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
			write_byte(player)
			write_string(buffer)
			message_end()
			
			for (i = 0; i < changedcount; i++)
				setarg(changed[i], 0, LANG_PLAYER)
		}
	}
	else
	{
		vformat(buffer, charsmax(buffer), message, 3)
		
		message_begin(MSG_ONE, g_msgSayText, _, target)
		write_byte(target)
		write_string(buffer)
		message_end()
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Link:
Linklerini gizle
Linki Kopyala

TheAsTeRiX
Mesajlar: 718
Kayıt: Cmt Oca 14, 2017 5:30 pm
Konum: Makedonya
Clan İsmi: Skull Gaming

Duman özelliği olan zombi

Mesaj gönderen TheAsTeRiX »

Zombieplaguee.inc yoksa bunu zombieplaguee.inc olarak kaydet scripting/include klasörüne at.

Kod: Tümünü seç

/*================================================================================
	
	---------------------------------------
	-*- Zombie Plague 4.3 Includes File -*-
	---------------------------------------
	
	~~~~~~~~~~
	- How To -
	~~~~~~~~~~
	
	To make use of the Zombie Plague API features in your plugin, just
	add the following line at the beginning of your script:
	
	#include <zombieplague>
	
	~~~~~~~~~~~
	- Natives -
	~~~~~~~~~~~
	
	These work just like any other functions: you may have to pass
	parameters and they usually return values.
	
	Example:
	
	if ( is_user_alive( id ) && zp_get_user_zombie( id ) )
	{
		server_print( "Player %d is alive and a zombie", id )
	}
	
	~~~~~~~~~~~~
	- Forwards -
	~~~~~~~~~~~~
	
	Forwards get called whenever an event happens during the game.
	You need to make a public callback somewhere on your script,
	and it will automatically be triggered when the event occurs.
	
	Example:
	
	public zp_user_infected_post( id, infector, nemesis )
	{
		if ( !infector || nemesis )
			return;
		
		server_print( "Player %d just got infected by %d!", id, infector )
	}
	
	Also, take note of cases when there's a suffix:
	
	* _pre  : means the forward will be called BEFORE the event happens
	* _post : means it will be called AFTER the event takes place
	
=================================================================================*/

#if defined _zombieplague_included
  #endinput
#endif
#define _zombieplague_included

/* Teams for zp_register_extra_item() */
#define ZP_TEAM_ZOMBIE (1<<0)
#define ZP_TEAM_HUMAN (1<<1)
#define ZP_TEAM_NEMESIS (1<<2)
#define ZP_TEAM_SURVIVOR (1<<3)

/* Game modes for zp_round_started() */
enum
{
	MODE_INFECTION = 1,
	MODE_NEMESIS,
	MODE_SURVIVOR,
	MODE_SWARM,
	MODE_MULTI,
	MODE_PLAGUE
}

/* Winner teams for zp_round_ended() */
enum
{
	WIN_NO_ONE = 0,
	WIN_ZOMBIES,
	WIN_HUMANS
}

/* Custom forward return values */
#define ZP_PLUGIN_HANDLED 97

/**
 * Returns whether a player is a zombie.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native zp_get_user_zombie(id)

/**
 * Returns whether a player is a nemesis.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native zp_get_user_nemesis(id)

/**
 * Returns whether a player is a survivor.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native zp_get_user_survivor(id)

/**
 * Returns whether a player is the first zombie.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native zp_get_user_first_zombie(id)

/**
 * Returns whether a player is the last zombie.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native zp_get_user_last_zombie(id)

/**
 * Returns whether a player is the last human.
 *
 * @param id		Player index.
 * @return		True if it is, false otherwise.
 */
native zp_get_user_last_human(id)

/**
 * Returns a player's current zombie class ID.
 *
 * @param id		Player index.
 * @return		Internal zombie class ID, or -1 if not yet chosen.
 */
native zp_get_user_zombie_class(id)

/**
 * Returns a player's next zombie class ID (for the next infection).
 *
 * @param id		Player index.
 * @return		Internal zombie class ID, or -1 if not yet chosen.
 */
native zp_get_user_next_class(id)

/**
 * Sets a player's next zombie class ID (for the next infection).
 *
 * @param id		Player index.
 * @param classid	A valid zombie class ID.
 * @return		True on success, false otherwise.
 */
native zp_set_user_zombie_class(id, classid)

/**
 * Returns a player's ammo pack count.
 *
 * @param id		Player index.
 * @return		Number of ammo packs owned.
 */
native zp_get_user_ammo_packs(id)

/**
 * Sets a player's ammo pack count.
 *
 * @param id		Player index.
 * @param amount	New quantity of ammo packs owned.
 */
native zp_set_user_ammo_packs(id, amount)

/**
 * Returns the default maximum health of a zombie.
 *
 * Note: Takes into account first zombie's HP multiplier.
 *
 * @param id		Player index.
 * @return		Maximum amount of health points, or -1 if not a normal zombie.
 */
native zp_get_zombie_maxhealth(id)

/**
 * Returns a player's custom flashlight batteries charge.
 *
 * @param id		Player index.
 * @return		Charge percent (0 to 100).
 */
native zp_get_user_batteries(id)

/**
 * Sets a player's custom flashlight batteries charge.
 *
 * @param id		Player index.
 * @param value		New charge percent (0 to 100).
 */
native zp_set_user_batteries(id, charge)

/**
 * Returns whether a player has night vision.
 *
 * @param id		Player index.
 * @return		True if it has, false otherwise.
 */
native zp_get_user_nightvision(id)

/**
 * Sets whether a player has night vision.
 *
 * @param id		Player index.
 * @param set		True to give, false for removing it.
 */
native zp_set_user_nightvision(id, set)

/**
 * Forces a player to become a zombie.
 *
 * Note: Unavailable for last human/survivor.
 *
 * @param id		Player index to be infected.
 * @param infector	Player index who infected him (optional).
 * @param silent	If set, there will be no HUD messages or infection sounds.
 * @param rewards	Whether to show DeathMsg and reward frags, hp, and ammo packs to infector.
 * @return		True on success, false otherwise.
 */
native zp_infect_user(id, infector = 0, silent = 0, rewards = 0)

/**
 * Forces a player to become a human.
 *
 * Note: Unavailable for last zombie/nemesis.
 *
 * @param id		Player index to be cured.
 * @param silent	If set, there will be no HUD messages or antidote sounds.
 * @return		True on success, false otherwise.
 */
native zp_disinfect_user(id, silent = 0)

/**
 * Forces a player to become a nemesis.
 *
 * Note: Unavailable for last human/survivor.
 *
 * @param id		Player index to turn into nemesis.
 * @return		True on success, false otherwise.
 */
native zp_make_user_nemesis(id)

/**
 * Forces a player to become a survivor.
 *
 * Note: Unavailable for last zombie/nemesis.
 *
 * @param id		Player index to turn into survivor.
 * @return		True on success, false otherwise.
 */
native zp_make_user_survivor(id)

/**
 * Respawns a player into a specific team.
 *
 * @param id		Player index to be respawned.
 * @param team		Team to respawn the player into (ZP_TEAM_ZOMBIE or ZP_TEAM_HUMAN).
 * @return		True on success, false otherwise.
 */
native zp_respawn_user(id, team)

/**
 * Forces a player to buy an extra item.
 *
 * @param id		Player index.
 * @param itemid	A valid extra item ID.
 * @param ignorecost	If set, item's cost won't be deduced from player.
 * @return		True on success, false otherwise.
 */
native zp_force_buy_extra_item(id, itemid, ignorecost = 0)

/**
 * 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)

/**
 * Returns whether the ZP round has started, i.e. first zombie
 * has been chosen or a game mode has begun.
 *
 * @return		0 - Round not started
 *			1 - Round started
 *			2 - Round starting
 */
native zp_has_round_started()

/**
 * Returns whether the current round is a nemesis round.
 *
 * @return		True if it is, false otherwise.
 */
native zp_is_nemesis_round()

/**
 * Returns whether the current round is a survivor round.
 *
 * @return		True if it is, false otherwise.
 */
native zp_is_survivor_round()

/**
 * Returns whether the current round is a swarm round.
 *
 * @return		True if it is, false otherwise.
 */
native zp_is_swarm_round()

/**
 * Returns whether the current round is a plague round.
 *
 * @return		True if it is, false otherwise.
 */
native zp_is_plague_round()

/**
 * Returns number of alive zombies.
 *
 * @return		Zombie count.
 */
native zp_get_zombie_count()

/**
 * Returns number of alive humans.
 *
 * @return		Human count.
 */
native zp_get_human_count()

/**
 * Returns number of alive nemesis.
 *
 * @return		Nemesis count.
 */
native zp_get_nemesis_count()

/**
 * Returns number of alive survivors.
 *
 * @return		Survivor count.
 */
native zp_get_survivor_count()

/**
 * Registers a custom item which will be added to the extra items menu of ZP.
 *
 * Note: The returned extra item ID can be later used to catch item
 * purchase events for the zp_extra_item_selected() forward.
 *
 * Note: ZP_TEAM_NEMESIS and ZP_TEAM_SURVIVOR can be used to make
 * an item available to Nemesis and Survivors respectively.
 *
 * @param name		Caption to display on the menu.
 * @param cost		Ammo packs to be deducted on purchase.
 * @param teams		Bitsum of teams it should be available for.
 * @return		An internal extra item ID, or -1 on failure.
 */
native zp_register_extra_item(const name[], cost, teams)

/**
 * Registers a custom class which will be added to the zombie classes menu of ZP.
 *
 * Note: The returned zombie class ID can be later used to identify
 * the class when calling the zp_get_user_zombie_class() natives.
 *
 * @param name		Caption to display on the menu.
 * @param info		Brief description of the class.
 * @param model		Player model to be used.
 * @param clawmodel	Claws model to be used.
 * @param hp		Initial health points.
 * @param speed		Maximum speed.
 * @param gravity	Gravity multiplier.
 * @param knockback	Knockback multiplier.
 * @return		An internal zombie class ID, or -1 on failure.
 */
native zp_register_zombie_class(const name[], const info[], const model[], const clawmodel[], hp, speed, Float:gravity, Float:knockback)

/**
 * Returns an extra item's ID.
 *
 * @param name		Item name to look for.
 * @return		Internal extra item ID, or -1 if not found.
 */
native zp_get_extra_item_id(const name[])

/**
 * Returns a zombie class' ID.
 *
 * @param name		Class name to look for.
 * @return		Internal zombie class ID, or -1 if not found.
 */
native zp_get_zombie_class_id(const name[])

/**
 * Returns a zombie class' description (passed by reference).
 *
 * @param classid		Internal zombie class ID.
 * @param info			The buffer to store the string in.
 * @param len			Character size of the output buffer.
 * @return			True on success, false otherwise.
 */
native zp_get_zombie_class_info(classid, info[], len)

/**
 * Called when the ZP round starts, i.e. first zombie
 * is chosen or a game mode begins.
 *
 * @param gamemode	Mode which has started.
 * @param id		Affected player's index (if applicable).
 */
forward zp_round_started(gamemode, id)

/**
 * Called when the round ends.
 *
 * @param winteam	Team which has won the round.
 */
forward zp_round_ended(winteam)

/**
 * Called when a player gets infected.
 *
 * @param id		Player index who was infected.
 * @param infector	Player index who infected him (if applicable).
 * @param nemesis	Whether the player was turned into a nemesis.
 */
forward zp_user_infected_pre(id, infector, nemesis)
forward zp_user_infected_post(id, infector, nemesis)

/**
 * Called when a player turns back to human.
 *
 * @param id		Player index who was cured.
 * @param survivor	Whether the player was turned into a survivor.
 */
forward zp_user_humanized_pre(id, survivor)
forward zp_user_humanized_post(id, survivor)

/**
 * Called on a player infect/cure attempt. You can use this to block
 * an infection/humanization by returning ZP_PLUGIN_HANDLED in your plugin.
 *
 * Note: Right now this is only available after the ZP round starts, since some
 * situations (like blocking a first zombie's infection) are not yet handled.
 */
forward zp_user_infect_attempt(id, infector, nemesis)
forward zp_user_humanize_attempt(id, survivor)

/**
 * Called when a player buys an extra item from the ZP menu.
 *
 * Note: You can now return ZP_PLUGIN_HANDLED in your plugin to block
 * the purchase and the player will be automatically refunded.
 *
 * @param id		Player index of purchaser.
 * @param itemid	Internal extra item ID.
 */
forward zp_extra_item_selected(id, itemid)

/**
 * Called when a player gets unfrozen (frostnades).
 *
 * @param id		Player index.
 */
forward zp_user_unfrozen(id)

/**
 * Called when a player becomes the last zombie.
 *
 * Note: This is called for the first zombie too.
 *
 * @param id		Player index.
 */
forward zp_user_last_zombie(id)

/**
 * Called when a player becomes the last human.
 *
 * @param id		Player index.
 */
forward zp_user_last_human(id)


/**
 * @deprecated - Do not use!
 * For backwards compatibility only.
 */
#define ZP_TEAM_ANY 0
#define ZP_TEAM_NO_ONE 0

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
DarkWorldzZ
Mesajlar: 99
Kayıt: Cmt Eki 21, 2017 2:12 pm
Clan İsmi: ~ Dark World'Z~

Duman özelliği olan zombi

Mesaj gönderen DarkWorldzZ »

TheAsTeRiX yazdı: Cmt Mar 03, 2018 8:37 pm

Kod: Tümünü seç

#include <amxmodx>
#include <fakemeta>
#include <zombieplaguee>

#define PLUGIN "NST Zombie Class Pc"
#define VERSION "1.0"
#define AUTHOR "NST"

new const zclass_name[] = "Pisiko Zombi"
new const zclass_info[] = "Ayarli"
new const zclass_model[] = "pc_zombi_host"
new const zclass_clawmodel[] = "v_knife_pc_zombi.mdl"
const zclass_health = 6000
const zclass_speed = 260
const Float:zclass_gravity = 0.8
const Float:zclass_knockback = 2.5

new idclass
const Float:smoke_time = 10.0
const Float:smoke_timewait = 10.0
const smoke_size = 4

new const sound_smoke[] = "zombie_plague/zombi_smoke.wav"
new idsprites_smoke

new g_smoke[33], g_smoke_wait[33], Float:g_smoke_origin[33][3]

new g_msgSayText
new g_maxplayers
new g_roundend

enum (+= 100)
{
	TASK_SMOKE = 2000,
	TASK_SMOKE_EXP,
	TASK_WAIT_SMOKE,
	TASK_BOT_USE_SKILL
}

#define ID_SMOKE (taskid - TASK_SMOKE)
#define ID_SMOKE_EXP (taskid - TASK_SMOKE_EXP)
#define ID_WAIT_SMOKE (taskid - TASK_WAIT_SMOKE)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_event("DeathMsg", "Death", "a")
	register_logevent("logevent_round_end", 2, "1=Round_End")
	
	register_clcmd("drop", "cmd_smoke")

	g_msgSayText = get_user_msgid("SayText")
	g_maxplayers = get_maxplayers()
}

public plugin_precache()
{
	idsprites_smoke = precache_model("sprites/zb_smoke.spr")
	
	precache_sound(sound_smoke)
	
	idclass = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_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=1; id<=g_maxplayers; id++)
	{
		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 zp_user_infected_post(id)
{
	reset_value_player(id)
	
	if(zp_get_user_nemesis(id)) return;
	
	if(zp_get_user_zombie_class(id) == idclass)
	{
		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[ZE]^x04 Smoking^x01 Yetenegin ^x04 %.1f ^x01Saniye Sonra Aktif.", smoke_timewait)
	}
}

public zp_user_humanized_post(id)
{
	reset_value_player(id)
}

public cmd_smoke(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

	if (zp_get_user_zombie_class(id) == idclass && !g_smoke[id] && !g_smoke_wait[id])
	{
		g_smoke[id] = 1
		
		pev(id,pev_origin,g_smoke_origin[id])
		
		set_task(0.1, "SmokeExplode", id+TASK_SMOKE_EXP)
		
		PlaySound(id, sound_smoke)
		
		set_task(smoke_time, "RemoveSmoke", id+TASK_SMOKE)
		
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

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

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

public SmokeExplode(taskid)
{
	new id = ID_SMOKE_EXP
	
	if (!g_smoke[id])
	{
		remove_task(id+TASK_SMOKE_EXP)
		return;
	}
	
	new Float:origin[3]
	origin[0] = g_smoke_origin[id][0]
	origin[1] = g_smoke_origin[id][1]
	origin[2] = g_smoke_origin[id][2]
	
	new flags = pev(id, pev_flags)
	if (!((flags & FL_DUCKING) && (flags & FL_ONGROUND)))
		origin[2] -= 36.0
	
	Create_Smoke_Group(origin)
	set_task(1.0, "SmokeExplode", id+TASK_SMOKE_EXP)
	
	return;
}

public RemoveSmoke(taskid)
{
	new id = ID_SMOKE
	
	g_smoke[id] = 0
	g_smoke_wait[id] = 1
	
	set_task(smoke_timewait, "RemoveWaitSmoke", id+TASK_WAIT_SMOKE)
}

public RemoveWaitSmoke(taskid)
{
	new id = ID_WAIT_SMOKE
	
	g_smoke_wait[id] = 0
	
	zp_colored_print(id, "^x04[ZP]^x04 Smoking^x01 Yetenegin Aktif.")
}

PlaySound(id, const sound[])
{
	client_cmd(id, "spk ^"%s^"", sound)
}

Create_Smoke_Group(Float:position[3])
{
	new Float:origin[12][3]
	get_spherical_coord(position, 40.0, 0.0, 0.0, origin[0])
	get_spherical_coord(position, 40.0, 90.0, 0.0, origin[1])
	get_spherical_coord(position, 40.0, 180.0, 0.0, origin[2])
	get_spherical_coord(position, 40.0, 270.0, 0.0, origin[3])
	get_spherical_coord(position, 100.0, 0.0, 0.0, origin[4])
	get_spherical_coord(position, 100.0, 45.0, 0.0, origin[5])
	get_spherical_coord(position, 100.0, 90.0, 0.0, origin[6])
	get_spherical_coord(position, 100.0, 135.0, 0.0, origin[7])
	get_spherical_coord(position, 100.0, 180.0, 0.0, origin[8])
	get_spherical_coord(position, 100.0, 225.0, 0.0, origin[9])
	get_spherical_coord(position, 100.0, 270.0, 0.0, origin[10])
	get_spherical_coord(position, 100.0, 315.0, 0.0, origin[11])
	
	for (new i = 0; i < smoke_size; i++)
		create_Smoke(origin[i], idsprites_smoke, 100, 0)
}

create_Smoke(const Float:position[3], sprite_index, life, framerate)
{
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(TE_SMOKE)
	engfunc(EngFunc_WriteCoord, position[0])
	engfunc(EngFunc_WriteCoord, position[1])
	engfunc(EngFunc_WriteCoord, position[2])
	write_short(sprite_index)
	write_byte(life)
	write_byte(framerate)
	message_end()
}

get_spherical_coord(const Float:ent_origin[3], Float:redius, Float:level_angle, Float:vertical_angle, Float:origin[3])
{
	new Float:length
	length  = redius * floatcos(vertical_angle, degrees)
	origin[0] = ent_origin[0] + length * floatcos(level_angle, degrees)
	origin[1] = ent_origin[1] + length * floatsin(level_angle, degrees)
	origin[2] = ent_origin[2] + redius * floatsin(vertical_angle, degrees)
}

reset_value_player(id)
{
	g_smoke[id] = 0
	g_smoke_wait[id] = 0
	
	remove_task(id+TASK_SMOKE)
	remove_task(id+TASK_WAIT_SMOKE)
	remove_task(id+TASK_SMOKE_EXP)
	remove_task(id+TASK_BOT_USE_SKILL)
}

zp_colored_print(target, const message[], any:...)
{
	static buffer[512], i, argscount
	argscount = numargs()
	
	if (!target)
	{
		static player
		for (player = 1; player <= g_maxplayers; player++)
		{
			if (!is_user_connected(player))
				continue;
			
			static changed[5], changedcount
			changedcount = 0
			
			for (i = 2; i < argscount; i++)
			{
				if (getarg(i) == LANG_PLAYER)
				{
					setarg(i, 0, player)
					changed[changedcount] = i
					changedcount++
				}
			}
			
			vformat(buffer, charsmax(buffer), message, 3)
			
			message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
			write_byte(player)
			write_string(buffer)
			message_end()
			
			for (i = 0; i < changedcount; i++)
				setarg(changed[i], 0, LANG_PLAYER)
		}
	}
	else
	{
		vformat(buffer, charsmax(buffer), message, 3)
		
		message_begin(MSG_ONE, g_msgSayText, _, target)
		write_byte(target)
		write_string(buffer)
		message_end()
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
fatal error 100: cannot read from file: "zombieplaguee"

Compilation aborted.
1 Error.
Done.
hata verdi

Link:
Linklerini gizle
Linki Kopyala

TheAsTeRiX
Mesajlar: 718
Kayıt: Cmt Oca 14, 2017 5:30 pm
Konum: Makedonya
Clan İsmi: Skull Gaming

Duman özelliği olan zombi

Mesaj gönderen TheAsTeRiX »

DarkWorldzZ yazdı: Cmt Mar 03, 2018 8:46 pm
TheAsTeRiX yazdı: Cmt Mar 03, 2018 8:37 pm

Kod: Tümünü seç

#include <amxmodx>
#include <fakemeta>
#include <zombieplaguee>

#define PLUGIN "NST Zombie Class Pc"
#define VERSION "1.0"
#define AUTHOR "NST"

new const zclass_name[] = "Pisiko Zombi"
new const zclass_info[] = "Ayarli"
new const zclass_model[] = "pc_zombi_host"
new const zclass_clawmodel[] = "v_knife_pc_zombi.mdl"
const zclass_health = 6000
const zclass_speed = 260
const Float:zclass_gravity = 0.8
const Float:zclass_knockback = 2.5

new idclass
const Float:smoke_time = 10.0
const Float:smoke_timewait = 10.0
const smoke_size = 4

new const sound_smoke[] = "zombie_plague/zombi_smoke.wav"
new idsprites_smoke

new g_smoke[33], g_smoke_wait[33], Float:g_smoke_origin[33][3]

new g_msgSayText
new g_maxplayers
new g_roundend

enum (+= 100)
{
	TASK_SMOKE = 2000,
	TASK_SMOKE_EXP,
	TASK_WAIT_SMOKE,
	TASK_BOT_USE_SKILL
}

#define ID_SMOKE (taskid - TASK_SMOKE)
#define ID_SMOKE_EXP (taskid - TASK_SMOKE_EXP)
#define ID_WAIT_SMOKE (taskid - TASK_WAIT_SMOKE)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_event("DeathMsg", "Death", "a")
	register_logevent("logevent_round_end", 2, "1=Round_End")
	
	register_clcmd("drop", "cmd_smoke")

	g_msgSayText = get_user_msgid("SayText")
	g_maxplayers = get_maxplayers()
}

public plugin_precache()
{
	idsprites_smoke = precache_model("sprites/zb_smoke.spr")
	
	precache_sound(sound_smoke)
	
	idclass = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_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=1; id<=g_maxplayers; id++)
	{
		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 zp_user_infected_post(id)
{
	reset_value_player(id)
	
	if(zp_get_user_nemesis(id)) return;
	
	if(zp_get_user_zombie_class(id) == idclass)
	{
		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[ZE]^x04 Smoking^x01 Yetenegin ^x04 %.1f ^x01Saniye Sonra Aktif.", smoke_timewait)
	}
}

public zp_user_humanized_post(id)
{
	reset_value_player(id)
}

public cmd_smoke(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

	if (zp_get_user_zombie_class(id) == idclass && !g_smoke[id] && !g_smoke_wait[id])
	{
		g_smoke[id] = 1
		
		pev(id,pev_origin,g_smoke_origin[id])
		
		set_task(0.1, "SmokeExplode", id+TASK_SMOKE_EXP)
		
		PlaySound(id, sound_smoke)
		
		set_task(smoke_time, "RemoveSmoke", id+TASK_SMOKE)
		
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

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

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

public SmokeExplode(taskid)
{
	new id = ID_SMOKE_EXP
	
	if (!g_smoke[id])
	{
		remove_task(id+TASK_SMOKE_EXP)
		return;
	}
	
	new Float:origin[3]
	origin[0] = g_smoke_origin[id][0]
	origin[1] = g_smoke_origin[id][1]
	origin[2] = g_smoke_origin[id][2]
	
	new flags = pev(id, pev_flags)
	if (!((flags & FL_DUCKING) && (flags & FL_ONGROUND)))
		origin[2] -= 36.0
	
	Create_Smoke_Group(origin)
	set_task(1.0, "SmokeExplode", id+TASK_SMOKE_EXP)
	
	return;
}

public RemoveSmoke(taskid)
{
	new id = ID_SMOKE
	
	g_smoke[id] = 0
	g_smoke_wait[id] = 1
	
	set_task(smoke_timewait, "RemoveWaitSmoke", id+TASK_WAIT_SMOKE)
}

public RemoveWaitSmoke(taskid)
{
	new id = ID_WAIT_SMOKE
	
	g_smoke_wait[id] = 0
	
	zp_colored_print(id, "^x04[ZP]^x04 Smoking^x01 Yetenegin Aktif.")
}

PlaySound(id, const sound[])
{
	client_cmd(id, "spk ^"%s^"", sound)
}

Create_Smoke_Group(Float:position[3])
{
	new Float:origin[12][3]
	get_spherical_coord(position, 40.0, 0.0, 0.0, origin[0])
	get_spherical_coord(position, 40.0, 90.0, 0.0, origin[1])
	get_spherical_coord(position, 40.0, 180.0, 0.0, origin[2])
	get_spherical_coord(position, 40.0, 270.0, 0.0, origin[3])
	get_spherical_coord(position, 100.0, 0.0, 0.0, origin[4])
	get_spherical_coord(position, 100.0, 45.0, 0.0, origin[5])
	get_spherical_coord(position, 100.0, 90.0, 0.0, origin[6])
	get_spherical_coord(position, 100.0, 135.0, 0.0, origin[7])
	get_spherical_coord(position, 100.0, 180.0, 0.0, origin[8])
	get_spherical_coord(position, 100.0, 225.0, 0.0, origin[9])
	get_spherical_coord(position, 100.0, 270.0, 0.0, origin[10])
	get_spherical_coord(position, 100.0, 315.0, 0.0, origin[11])
	
	for (new i = 0; i < smoke_size; i++)
		create_Smoke(origin[i], idsprites_smoke, 100, 0)
}

create_Smoke(const Float:position[3], sprite_index, life, framerate)
{
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(TE_SMOKE)
	engfunc(EngFunc_WriteCoord, position[0])
	engfunc(EngFunc_WriteCoord, position[1])
	engfunc(EngFunc_WriteCoord, position[2])
	write_short(sprite_index)
	write_byte(life)
	write_byte(framerate)
	message_end()
}

get_spherical_coord(const Float:ent_origin[3], Float:redius, Float:level_angle, Float:vertical_angle, Float:origin[3])
{
	new Float:length
	length  = redius * floatcos(vertical_angle, degrees)
	origin[0] = ent_origin[0] + length * floatcos(level_angle, degrees)
	origin[1] = ent_origin[1] + length * floatsin(level_angle, degrees)
	origin[2] = ent_origin[2] + redius * floatsin(vertical_angle, degrees)
}

reset_value_player(id)
{
	g_smoke[id] = 0
	g_smoke_wait[id] = 0
	
	remove_task(id+TASK_SMOKE)
	remove_task(id+TASK_WAIT_SMOKE)
	remove_task(id+TASK_SMOKE_EXP)
	remove_task(id+TASK_BOT_USE_SKILL)
}

zp_colored_print(target, const message[], any:...)
{
	static buffer[512], i, argscount
	argscount = numargs()
	
	if (!target)
	{
		static player
		for (player = 1; player <= g_maxplayers; player++)
		{
			if (!is_user_connected(player))
				continue;
			
			static changed[5], changedcount
			changedcount = 0
			
			for (i = 2; i < argscount; i++)
			{
				if (getarg(i) == LANG_PLAYER)
				{
					setarg(i, 0, player)
					changed[changedcount] = i
					changedcount++
				}
			}
			
			vformat(buffer, charsmax(buffer), message, 3)
			
			message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
			write_byte(player)
			write_string(buffer)
			message_end()
			
			for (i = 0; i < changedcount; i++)
				setarg(changed[i], 0, LANG_PLAYER)
		}
	}
	else
	{
		vformat(buffer, charsmax(buffer), message, 3)
		
		message_begin(MSG_ONE, g_msgSayText, _, target)
		write_byte(target)
		write_string(buffer)
		message_end()
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
fatal error 100: cannot read from file: "zombieplaguee"

Compilation aborted.
1 Error.
Done.
hata verdi
2. mesajı okusaydın,bu hatayı vermezdi.

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
DarkWorldzZ
Mesajlar: 99
Kayıt: Cmt Eki 21, 2017 2:12 pm
Clan İsmi: ~ Dark World'Z~

Duman özelliği olan zombi

Mesaj gönderen DarkWorldzZ »

yaptım yine aynı hatayı verdi
Bu mesaja eklenen dosyaları görüntülemek için gerekli izinlere sahip değilsiniz.

Link:
Linklerini gizle
Linki Kopyala

TheAsTeRiX
Mesajlar: 718
Kayıt: Cmt Oca 14, 2017 5:30 pm
Konum: Makedonya
Clan İsmi: Skull Gaming

Duman özelliği olan zombi

Mesaj gönderen TheAsTeRiX »

DarkWorldzZ yazdı: Cmt Mar 03, 2018 8:58 pm yaptım yine aynı hatayı verdi
Verme imkanı yok,zombieplaguee.inc olarak uzantısını ayarla scripting klasörüne gir include klasörü oluştur içine at.

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
DarkWorldzZ
Mesajlar: 99
Kayıt: Cmt Eki 21, 2017 2:12 pm
Clan İsmi: ~ Dark World'Z~

Duman özelliği olan zombi

Mesaj gönderen DarkWorldzZ »

TheAsTeRiX yazdı: Cmt Mar 03, 2018 8:59 pm
DarkWorldzZ yazdı: Cmt Mar 03, 2018 8:58 pm yaptım yine aynı hatayı verdi
Verme imkanı yok,zombieplaguee.inc olarak uzantısını ayarla scripting klasörüne gir include klasörü oluştur içine at.
https://i.hizliresim.com/0Epnb8.png

Link:
Linklerini gizle
Linki Kopyala

TheAsTeRiX
Mesajlar: 718
Kayıt: Cmt Oca 14, 2017 5:30 pm
Konum: Makedonya
Clan İsmi: Skull Gaming

Duman özelliği olan zombi

Mesaj gönderen TheAsTeRiX »

DarkWorldzZ yazdı: Cmt Mar 03, 2018 9:03 pm
TheAsTeRiX yazdı: Cmt Mar 03, 2018 8:59 pm
DarkWorldzZ yazdı: Cmt Mar 03, 2018 8:58 pm yaptım yine aynı hatayı verdi
Verme imkanı yok,zombieplaguee.inc olarak uzantısını ayarla scripting klasörüne gir include klasörü oluştur içine at.
https://i.hizliresim.com/0Epnb8.png

Kod: Tümünü seç

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

#define PLUGIN "NST Zombie Class Pc"
#define VERSION "1.0"
#define AUTHOR "NST"

new const zclass_name[] = "Pisiko Zombi (Psycho)"
new const zclass_info[] = "[Duman Yetenegi Icin 'G']"
new const zclass_model[] = "pc_zombi_host"
new const zclass_clawmodel[] = "v_knife_pc_zombi.mdl"
const zclass_health = 8000
const zclass_speed = 280
const Float:zclass_gravity = 0.70
const Float:zclass_knockback = 3.0

new idclass
const Float:smoke_time = 10.0
const Float:smoke_timewait = 10.0
const smoke_size = 4

new const sound_smoke[] = "zombie_plague/zombi_smoke.wav"
new idsprites_smoke

new g_smoke[33], g_smoke_wait[33], Float:g_smoke_origin[33][3]

new g_msgSayText
new g_maxplayers
new g_roundend

enum (+= 100)
{
	TASK_SMOKE = 2000,
	TASK_SMOKE_EXP,
	TASK_WAIT_SMOKE,
	TASK_BOT_USE_SKILL
}

#define ID_SMOKE (taskid - TASK_SMOKE)
#define ID_SMOKE_EXP (taskid - TASK_SMOKE_EXP)
#define ID_WAIT_SMOKE (taskid - TASK_WAIT_SMOKE)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_event("DeathMsg", "Death", "a")
	register_logevent("logevent_round_end", 2, "1=Round_End")
	
	register_clcmd("drop", "cmd_smoke")

	g_msgSayText = get_user_msgid("SayText")
	g_maxplayers = get_maxplayers()
}

public plugin_precache()
{
	idsprites_smoke = precache_model("sprites/zb_smoke.spr")
	
	precache_sound(sound_smoke)
	
	idclass = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_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=1; id<=g_maxplayers; id++)
	{
		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 zp_user_infected_post(id)
{
	reset_value_player(id)
	
	if(zp_get_user_nemesis(id)) return;
	
	if(zp_get_user_zombie_class(id) == idclass)
	{
		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[ZE]^x04 Smoking^x01 Yetenegin ^x04 %.1f ^x01Saniye Sonra Aktif.", smoke_timewait)
	}
}

public zp_user_humanized_post(id)
{
	reset_value_player(id)
}

public cmd_smoke(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

	if (zp_get_user_zombie_class(id) == idclass && !g_smoke[id] && !g_smoke_wait[id])
	{
		g_smoke[id] = 1
		
		pev(id,pev_origin,g_smoke_origin[id])
		
		set_task(0.1, "SmokeExplode", id+TASK_SMOKE_EXP)
		
		PlaySound(id, sound_smoke)
		
		set_task(smoke_time, "RemoveSmoke", id+TASK_SMOKE)
		
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

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

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

public SmokeExplode(taskid)
{
	new id = ID_SMOKE_EXP
	
	if (!g_smoke[id])
	{
		remove_task(id+TASK_SMOKE_EXP)
		return;
	}
	
	new Float:origin[3]
	origin[0] = g_smoke_origin[id][0]
	origin[1] = g_smoke_origin[id][1]
	origin[2] = g_smoke_origin[id][2]
	
	new flags = pev(id, pev_flags)
	if (!((flags & FL_DUCKING) && (flags & FL_ONGROUND)))
		origin[2] -= 36.0
	
	Create_Smoke_Group(origin)
	set_task(1.0, "SmokeExplode", id+TASK_SMOKE_EXP)
	
	return;
}

public RemoveSmoke(taskid)
{
	new id = ID_SMOKE
	
	g_smoke[id] = 0
	g_smoke_wait[id] = 1
	
	set_task(smoke_timewait, "RemoveWaitSmoke", id+TASK_WAIT_SMOKE)
}

public RemoveWaitSmoke(taskid)
{
	new id = ID_WAIT_SMOKE
	
	g_smoke_wait[id] = 0
	
	zp_colored_print(id, "^x04[ZP]^x04 Smoking^x01 Yetenegin Aktif.")
}

PlaySound(id, const sound[])
{
	client_cmd(id, "spk ^"%s^"", sound)
}

Create_Smoke_Group(Float:position[3])
{
	new Float:origin[12][3]
	get_spherical_coord(position, 40.0, 0.0, 0.0, origin[0])
	get_spherical_coord(position, 40.0, 90.0, 0.0, origin[1])
	get_spherical_coord(position, 40.0, 180.0, 0.0, origin[2])
	get_spherical_coord(position, 40.0, 270.0, 0.0, origin[3])
	get_spherical_coord(position, 100.0, 0.0, 0.0, origin[4])
	get_spherical_coord(position, 100.0, 45.0, 0.0, origin[5])
	get_spherical_coord(position, 100.0, 90.0, 0.0, origin[6])
	get_spherical_coord(position, 100.0, 135.0, 0.0, origin[7])
	get_spherical_coord(position, 100.0, 180.0, 0.0, origin[8])
	get_spherical_coord(position, 100.0, 225.0, 0.0, origin[9])
	get_spherical_coord(position, 100.0, 270.0, 0.0, origin[10])
	get_spherical_coord(position, 100.0, 315.0, 0.0, origin[11])
	
	for (new i = 0; i < smoke_size; i++)
		create_Smoke(origin[i], idsprites_smoke, 100, 0)
}

create_Smoke(const Float:position[3], sprite_index, life, framerate)
{
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(TE_SMOKE)
	engfunc(EngFunc_WriteCoord, position[0])
	engfunc(EngFunc_WriteCoord, position[1])
	engfunc(EngFunc_WriteCoord, position[2])
	write_short(sprite_index)
	write_byte(life)
	write_byte(framerate)
	message_end()
}

get_spherical_coord(const Float:ent_origin[3], Float:redius, Float:level_angle, Float:vertical_angle, Float:origin[3])
{
	new Float:length
	length  = redius * floatcos(vertical_angle, degrees)
	origin[0] = ent_origin[0] + length * floatcos(level_angle, degrees)
	origin[1] = ent_origin[1] + length * floatsin(level_angle, degrees)
	origin[2] = ent_origin[2] + redius * floatsin(vertical_angle, degrees)
}

reset_value_player(id)
{
	g_smoke[id] = 0
	g_smoke_wait[id] = 0
	
	remove_task(id+TASK_SMOKE)
	remove_task(id+TASK_WAIT_SMOKE)
	remove_task(id+TASK_SMOKE_EXP)
	remove_task(id+TASK_BOT_USE_SKILL)
}

zp_colored_print(target, const message[], any:...)
{
	static buffer[512], i, argscount
	argscount = numargs()
	
	if (!target)
	{
		static player
		for (player = 1; player <= g_maxplayers; player++)
		{
			if (!is_user_connected(player))
				continue;
			
			static changed[5], changedcount
			changedcount = 0
			
			for (i = 2; i < argscount; i++)
			{
				if (getarg(i) == LANG_PLAYER)
				{
					setarg(i, 0, player)
					changed[changedcount] = i
					changedcount++
				}
			}
			
			vformat(buffer, charsmax(buffer), message, 3)
			
			message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
			write_byte(player)
			write_string(buffer)
			message_end()
			
			for (i = 0; i < changedcount; i++)
				setarg(changed[i], 0, LANG_PLAYER)
		}
	}
	else
	{
		vformat(buffer, charsmax(buffer), message, 3)
		
		message_begin(MSG_ONE, g_msgSayText, _, target)
		write_byte(target)
		write_string(buffer)
		message_end()
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Link:
Linklerini gizle
Linki Kopyala

Konu Sahibi
DarkWorldzZ
Mesajlar: 99
Kayıt: Cmt Eki 21, 2017 2:12 pm
Clan İsmi: ~ Dark World'Z~

Duman özelliği olan zombi

Mesaj gönderen DarkWorldzZ »

TheAsTeRiX yazdı: Cmt Mar 03, 2018 9:04 pm
DarkWorldzZ yazdı: Cmt Mar 03, 2018 9:03 pm
TheAsTeRiX yazdı: Cmt Mar 03, 2018 8:59 pm

Verme imkanı yok,zombieplaguee.inc olarak uzantısını ayarla scripting klasörüne gir include klasörü oluştur içine at.
https://i.hizliresim.com/0Epnb8.png

Kod: Tümünü seç

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

#define PLUGIN "NST Zombie Class Pc"
#define VERSION "1.0"
#define AUTHOR "NST"

new const zclass_name[] = "Pisiko Zombi (Psycho)"
new const zclass_info[] = "[Duman Yetenegi Icin 'G']"
new const zclass_model[] = "pc_zombi_host"
new const zclass_clawmodel[] = "v_knife_pc_zombi.mdl"
const zclass_health = 8000
const zclass_speed = 280
const Float:zclass_gravity = 0.70
const Float:zclass_knockback = 3.0

new idclass
const Float:smoke_time = 10.0
const Float:smoke_timewait = 10.0
const smoke_size = 4

new const sound_smoke[] = "zombie_plague/zombi_smoke.wav"
new idsprites_smoke

new g_smoke[33], g_smoke_wait[33], Float:g_smoke_origin[33][3]

new g_msgSayText
new g_maxplayers
new g_roundend

enum (+= 100)
{
	TASK_SMOKE = 2000,
	TASK_SMOKE_EXP,
	TASK_WAIT_SMOKE,
	TASK_BOT_USE_SKILL
}

#define ID_SMOKE (taskid - TASK_SMOKE)
#define ID_SMOKE_EXP (taskid - TASK_SMOKE_EXP)
#define ID_WAIT_SMOKE (taskid - TASK_WAIT_SMOKE)
#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_event("DeathMsg", "Death", "a")
	register_logevent("logevent_round_end", 2, "1=Round_End")
	
	register_clcmd("drop", "cmd_smoke")

	g_msgSayText = get_user_msgid("SayText")
	g_maxplayers = get_maxplayers()
}

public plugin_precache()
{
	idsprites_smoke = precache_model("sprites/zb_smoke.spr")
	
	precache_sound(sound_smoke)
	
	idclass = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_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=1; id<=g_maxplayers; id++)
	{
		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 zp_user_infected_post(id)
{
	reset_value_player(id)
	
	if(zp_get_user_nemesis(id)) return;
	
	if(zp_get_user_zombie_class(id) == idclass)
	{
		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[ZE]^x04 Smoking^x01 Yetenegin ^x04 %.1f ^x01Saniye Sonra Aktif.", smoke_timewait)
	}
}

public zp_user_humanized_post(id)
{
	reset_value_player(id)
}

public cmd_smoke(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

	if (zp_get_user_zombie_class(id) == idclass && !g_smoke[id] && !g_smoke_wait[id])
	{
		g_smoke[id] = 1
		
		pev(id,pev_origin,g_smoke_origin[id])
		
		set_task(0.1, "SmokeExplode", id+TASK_SMOKE_EXP)
		
		PlaySound(id, sound_smoke)
		
		set_task(smoke_time, "RemoveSmoke", id+TASK_SMOKE)
		
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

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

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

public SmokeExplode(taskid)
{
	new id = ID_SMOKE_EXP
	
	if (!g_smoke[id])
	{
		remove_task(id+TASK_SMOKE_EXP)
		return;
	}
	
	new Float:origin[3]
	origin[0] = g_smoke_origin[id][0]
	origin[1] = g_smoke_origin[id][1]
	origin[2] = g_smoke_origin[id][2]
	
	new flags = pev(id, pev_flags)
	if (!((flags & FL_DUCKING) && (flags & FL_ONGROUND)))
		origin[2] -= 36.0
	
	Create_Smoke_Group(origin)
	set_task(1.0, "SmokeExplode", id+TASK_SMOKE_EXP)
	
	return;
}

public RemoveSmoke(taskid)
{
	new id = ID_SMOKE
	
	g_smoke[id] = 0
	g_smoke_wait[id] = 1
	
	set_task(smoke_timewait, "RemoveWaitSmoke", id+TASK_WAIT_SMOKE)
}

public RemoveWaitSmoke(taskid)
{
	new id = ID_WAIT_SMOKE
	
	g_smoke_wait[id] = 0
	
	zp_colored_print(id, "^x04[ZP]^x04 Smoking^x01 Yetenegin Aktif.")
}

PlaySound(id, const sound[])
{
	client_cmd(id, "spk ^"%s^"", sound)
}

Create_Smoke_Group(Float:position[3])
{
	new Float:origin[12][3]
	get_spherical_coord(position, 40.0, 0.0, 0.0, origin[0])
	get_spherical_coord(position, 40.0, 90.0, 0.0, origin[1])
	get_spherical_coord(position, 40.0, 180.0, 0.0, origin[2])
	get_spherical_coord(position, 40.0, 270.0, 0.0, origin[3])
	get_spherical_coord(position, 100.0, 0.0, 0.0, origin[4])
	get_spherical_coord(position, 100.0, 45.0, 0.0, origin[5])
	get_spherical_coord(position, 100.0, 90.0, 0.0, origin[6])
	get_spherical_coord(position, 100.0, 135.0, 0.0, origin[7])
	get_spherical_coord(position, 100.0, 180.0, 0.0, origin[8])
	get_spherical_coord(position, 100.0, 225.0, 0.0, origin[9])
	get_spherical_coord(position, 100.0, 270.0, 0.0, origin[10])
	get_spherical_coord(position, 100.0, 315.0, 0.0, origin[11])
	
	for (new i = 0; i < smoke_size; i++)
		create_Smoke(origin[i], idsprites_smoke, 100, 0)
}

create_Smoke(const Float:position[3], sprite_index, life, framerate)
{
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(TE_SMOKE)
	engfunc(EngFunc_WriteCoord, position[0])
	engfunc(EngFunc_WriteCoord, position[1])
	engfunc(EngFunc_WriteCoord, position[2])
	write_short(sprite_index)
	write_byte(life)
	write_byte(framerate)
	message_end()
}

get_spherical_coord(const Float:ent_origin[3], Float:redius, Float:level_angle, Float:vertical_angle, Float:origin[3])
{
	new Float:length
	length  = redius * floatcos(vertical_angle, degrees)
	origin[0] = ent_origin[0] + length * floatcos(level_angle, degrees)
	origin[1] = ent_origin[1] + length * floatsin(level_angle, degrees)
	origin[2] = ent_origin[2] + redius * floatsin(vertical_angle, degrees)
}

reset_value_player(id)
{
	g_smoke[id] = 0
	g_smoke_wait[id] = 0
	
	remove_task(id+TASK_SMOKE)
	remove_task(id+TASK_WAIT_SMOKE)
	remove_task(id+TASK_SMOKE_EXP)
	remove_task(id+TASK_BOT_USE_SKILL)
}

zp_colored_print(target, const message[], any:...)
{
	static buffer[512], i, argscount
	argscount = numargs()
	
	if (!target)
	{
		static player
		for (player = 1; player <= g_maxplayers; player++)
		{
			if (!is_user_connected(player))
				continue;
			
			static changed[5], changedcount
			changedcount = 0
			
			for (i = 2; i < argscount; i++)
			{
				if (getarg(i) == LANG_PLAYER)
				{
					setarg(i, 0, player)
					changed[changedcount] = i
					changedcount++
				}
			}
			
			vformat(buffer, charsmax(buffer), message, 3)
			
			message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
			write_byte(player)
			write_string(buffer)
			message_end()
			
			for (i = 0; i < changedcount; i++)
				setarg(changed[i], 0, LANG_PLAYER)
		}
	}
	else
	{
		vformat(buffer, charsmax(buffer), message, 3)
		
		message_begin(MSG_ONE, g_msgSayText, _, target)
		write_byte(target)
		write_string(buffer)
		message_end()
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Şimdi hata vermedi :D sağolsun

Link:
Linklerini gizle
Linki Kopyala
Cevapla