Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

problem z klasą premium


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
11 odpowiedzi w tym temacie

#1 MruczeQ

    Pomocny

  • Użytkownik

Reputacja: 0
zer0.

  • Postów:71
  • Imię:Kacper
  • Lokalizacja:Ełk
Offline

Napisano 08.05.2016 16:02

Siema, chciałem dodać do klasy Premium na ZM poziom na jakim miała być dostępna czyli "G" ale coś nie pykło i nawet po kompilacji jest ona dostępna dla wszystkich. Daję tu .sma pliku bez dodawania poziomu 

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>

#define PLUGIN "DJB Zombie Class Banchee"
#define VERSION "1.0"
#define AUTHOR "Csoldjb"

new const zclass_name[] = "Banchee"
new const zclass_info[] = "Kliknij G aby spawnowac nietoperze"
new const zclass_model[] = "witch_zombi_origin"
new const zclass_clawmodel[] = "v_knife_witch_zombi.mdl"
const zclass_health = 2900
const zclass_speed = 220
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 1.0

new const SOUND_FIRE[] = "zombie_plague/zombi_banshee_pulling_fire.wav"
new const SOUND_BAT_HIT[] = "zombie_plague/zombi_banshee_laugh.wav"
new const SOUND_BAT_MISS[] = "zombie_plague/zombi_banshee_pulling_fail.wav"
new const MODEL_BAT[] = "models/zombie_plague/bat_witch.mdl"
new const BAT_CLASSNAME[] = "banchee_bat"
new spr_skull

const Float:banchee_skull_bat_speed = 600.0
const Float:banchee_skull_bat_flytime = 3.0
const Float:banchee_skull_bat_catch_time = 3.0
const Float:banchee_skull_bat_catch_speed = 100.0
const Float:bat_timewait = 14.0

new g_stop[33]
new g_bat_time[33]
new g_bat_stat[33]
new g_bat_enemy[33]
new Float:g_temp_speed[33]

new idclass_banchee
new g_maxplayers
new g_roundend
new g_msgSayText

enum (+= 100)
{
	TASK_BOT_USE_SKILL = 2367,
	TASK_REMOVE_STAT
}

#define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)
#define ID_TASK_REMOVE_STAT (taskid - TASK_REMOVE_STAT)

public plugin_precache()
{
	precache_sound(SOUND_FIRE)
	precache_sound(SOUND_BAT_HIT)
	precache_sound(SOUND_BAT_MISS)
	
	precache_model(MODEL_BAT)
	
	spr_skull = precache_model("sprites/ef_bat.spr")
	
	idclass_banchee = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_event("HLTV", "EventHLTV", "a", "1=0", "2=0")
	register_event("DeathMsg", "EventDeath", "a")
	register_logevent("logevent_round_end", 2, "1=Round_End")
	
	register_clcmd("drop", "cmd_bat")
	
	register_forward(FM_PlayerPreThink,"fw_PlayerPreThink")
	
	RegisterHam(Ham_Touch,"info_target","EntityTouchPost",1)
	RegisterHam(Ham_Think,"info_target","EntityThink")
	
	g_maxplayers = get_maxplayers()
	g_msgSayText = get_user_msgid("SayText")
}

public client_putinserver(id)
{
	reset_value_player(id)
}

public client_disconnect(id)
{
	reset_value_player(id)
}

public EventHLTV()
{
	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 EventDeath()
{
	new id = read_data(2)
	
	reset_value_player(id)
}

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_banchee)
	{
		if(is_user_bot(id))
		{
			set_task(random_float(5.0,120.0), "bot_use_skill", id+TASK_BOT_USE_SKILL)
			return
		}
		
		zp_colored_print(id, "^x04[ZP]^x01 Twoj skill jest^x04 Spawn Bat^x01. Cooldown^x04 %.1f ^x01seconds.", bat_timewait)
	}
}

public zp_user_humanized_post(id)
{
	reset_value_player(id)
}

public cmd_bat(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_banchee && !g_bat_time[id])
	{
		g_bat_time[id] = 1
		
		set_task(bat_timewait,"clear_stat",id+TASK_REMOVE_STAT)
		
		new ent = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
		
		if(!pev_valid(ent)) return PLUGIN_HANDLED
		
		new Float:vecAngle[3],Float:vecOrigin[3],Float:vecVelocity[3],Float:vecForward[3]
		fm_get_user_startpos(id,5.0,2.0,-1.0,vecOrigin)
		pev(id,pev_angles,vecAngle)
		
		engfunc(EngFunc_MakeVectors,vecAngle)
		global_get(glb_v_forward,vecForward)
		
		velocity_by_aim(id,floatround(banchee_skull_bat_speed),vecVelocity)
		
		set_pev(ent,pev_origin,vecOrigin)
		set_pev(ent,pev_angles,vecAngle)
		set_pev(ent,pev_classname,BAT_CLASSNAME)
		set_pev(ent,pev_movetype,MOVETYPE_FLY)
		set_pev(ent,pev_solid,SOLID_BBOX)
		engfunc(EngFunc_SetSize,ent,{-20.0,-15.0,-8.0},{20.0,15.0,8.0})
		
		engfunc(EngFunc_SetModel,ent,MODEL_BAT)
		set_pev(ent,pev_animtime,get_gametime())
		set_pev(ent,pev_framerate,1.0)
		set_pev(ent,pev_owner,id)
		set_pev(ent,pev_velocity,vecVelocity)
		set_pev(ent,pev_nextthink,get_gametime()+banchee_skull_bat_flytime)
		emit_sound(ent, CHAN_WEAPON, SOUND_FIRE, 1.0, ATTN_NORM, 0, PITCH_NORM)
		
		g_stop[id] = ent
		
		PlayWeaponAnimation(id, 2)
		pev(id, pev_maxspeed, g_temp_speed[id])
		set_pev(id,pev_maxspeed,0.1)
		
		return PLUGIN_HANDLED
	}
	
	return PLUGIN_CONTINUE
}

public fw_PlayerPreThink(id)
{
	if(!is_user_alive(id)) return FMRES_IGNORED
	
	if(g_bat_stat[id])
	{
		new owner = g_bat_enemy[id], Float:ownerorigin[3]
		pev(owner,pev_origin,ownerorigin)
		static Float:vec[3]
		aim_at_origin(id,ownerorigin,vec)
		engfunc(EngFunc_MakeVectors, vec)
		global_get(glb_v_forward, vec)
		vec[0] *= banchee_skull_bat_catch_speed
		vec[1] *= banchee_skull_bat_catch_speed
		vec[2] = 0.0
		set_pev(id,pev_velocity,vec)
	}
	
	return FMRES_IGNORED
}

public EntityThink(ent)
{
	if(!pev_valid(ent)) return HAM_IGNORED
	
	new classname[32]
	pev(ent,pev_classname,classname,31)
	
	if(equal(classname,BAT_CLASSNAME))
	{
		static Float:origin[3];
		pev(ent,pev_origin,origin);
		
		message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
		write_byte(TE_EXPLOSION); // TE_EXPLOSION
		write_coord(floatround(origin[0])); // origin x
		write_coord(floatround(origin[1])); // origin y
		write_coord(floatround(origin[2])); // origin z
		write_short(spr_skull); // sprites
		write_byte(40); // scale in 0.1's
		write_byte(30); // framerate
		write_byte(14); // flags 
		message_end(); // message end
		
		emit_sound(ent, CHAN_WEAPON, SOUND_BAT_MISS, 1.0, ATTN_NORM, 0, PITCH_NORM)
		
		new owner = pev(ent, pev_owner)
		g_stop[owner] = 0
		set_pev(owner,pev_maxspeed,g_temp_speed[owner])
		
		engfunc(EngFunc_RemoveEntity,ent)
	}
	
	return HAM_IGNORED
}

public EntityTouchPost(ent,ptd)
{
	if(!pev_valid(ent)) return HAM_IGNORED
	
	new classname[32]
	pev(ent,pev_classname,classname,31)
	
	if(equal(classname,BAT_CLASSNAME))
	{
		if(!pev_valid(ptd))
		{
			static Float:origin[3];
			pev(ent,pev_origin,origin);
			
			message_begin(MSG_BROADCAST,SVC_TEMPENTITY); 
			write_byte(TE_EXPLOSION); // TE_EXPLOSION
			write_coord(floatround(origin[0])); // origin x
			write_coord(floatround(origin[1])); // origin y
			write_coord(floatround(origin[2])); // origin z
			write_short(spr_skull); // sprites
			write_byte(40); // scale in 0.1's
			write_byte(30); // framerate
			write_byte(14); // flags 
			message_end(); // message end
			
			emit_sound(ent, CHAN_WEAPON, SOUND_BAT_MISS, 1.0, ATTN_NORM, 0, PITCH_NORM)
			
			new owner = pev(ent, pev_owner)
			g_stop[owner] = 0
			set_pev(owner,pev_maxspeed,g_temp_speed[owner])
			
			engfunc(EngFunc_RemoveEntity,ent)
			
			return HAM_IGNORED
		}
		
		new owner = pev(ent,pev_owner)
		
		if(0 < ptd && ptd <= g_maxplayers && is_user_alive(ptd) && ptd != owner)
		{
			g_bat_enemy[ptd] = owner
			
			set_pev(ent,pev_nextthink,get_gametime()+banchee_skull_bat_catch_time)
			set_task(banchee_skull_bat_catch_time,"clear_stat2",ptd+TASK_REMOVE_STAT)
			set_pev(ent,pev_movetype,MOVETYPE_FOLLOW)
			set_pev(ent,pev_aiment,ptd)
			
			emit_sound(owner, CHAN_VOICE, SOUND_BAT_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM)
			
			g_bat_stat[ptd] = 1
		}
	}
	
	return HAM_IGNORED
}

public clear_stat(taskid)
{
	new id = ID_TASK_REMOVE_STAT
	
	g_bat_stat[id] = 0
	g_bat_time[id] = 0
	
	zp_colored_print(id, "^x04[ZP]^x01 Twoj Skill^x04 Spawnowania nietoperzy^x01 jest gotowy.")
}

public clear_stat2(idx)
{
	new id = idx-TASK_REMOVE_STAT
	
	g_bat_enemy[id] = 0
	g_bat_stat[id] = 0
}

public bot_use_skill(taskid)
{
	new id = ID_BOT_USE_SKILL
	
	if (!is_user_alive(id)) return;
	
	cmd_bat(id)
	
	set_task(random_float(5.0,15.0), "bot_use_skill", id+TASK_BOT_USE_SKILL)
}

fm_get_user_startpos(id,Float:forw,Float:right,Float:up,Float:vStart[])
{
	new Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
	
	pev(id, pev_origin, vOrigin)
	pev(id, pev_v_angle, vAngle)
	
	engfunc(EngFunc_MakeVectors, vAngle)
	
	global_get(glb_v_forward, vForward)
	global_get(glb_v_right, vRight)
	global_get(glb_v_up, vUp)
	
	vStart[0] = vOrigin[0] + vForward[0] * forw + vRight[0] * right + vUp[0] * up
	vStart[1] = vOrigin[1] + vForward[1] * forw + vRight[1] * right + vUp[1] * up
	vStart[2] = vOrigin[2] + vForward[2] * forw + vRight[2] * right + vUp[2] * up
}

aim_at_origin(id, Float:target[3], Float:angles[3])
{
	static Float:vec[3]
	pev(id,pev_origin,vec)
	vec[0] = target[0] - vec[0]
	vec[1] = target[1] - vec[1]
	vec[2] = target[2] - vec[2]
	engfunc(EngFunc_VecToAngles,vec,angles)
	angles[0] *= -1.0
	angles[2] = 0.0
}

PlayWeaponAnimation(id, animation)
{
	set_pev(id, pev_weaponanim, animation)
	message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, id)
	write_byte(animation)
	write_byte(pev(id, pev_body))
	message_end()
}

reset_value_player(id)
{
	g_stop[id] = 0
	g_bat_time[id] = 0
	g_bat_stat[id] = 0
	g_bat_enemy[id] = 0
	
	remove_task(id+TASK_BOT_USE_SKILL)
	remove_task(id+TASK_REMOVE_STAT)
}

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


  • +
  • -
  • 0

#2 MruczeQ

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:71
  • Imię:Kacper
  • Lokalizacja:Ełk
Offline

Napisano 10.05.2016 17:21

ref


  • +
  • -
  • 0

#3 aSik

    Wszechobecny

  • Użytkownik

Reputacja: 81
Zaawansowany

  • Postów:449
  • Imię:Robert
  • Lokalizacja:Wrocław
Offline

Napisano 10.05.2016 17:55

Po wypowiedzi wnioskuję, że próbowałeś coś wykombinować, ale Ci nie wyszło, dlatego nie dam gotowca, ale tipa ;>

 

 

https://amxx.pl/topi...zombie-premium/


  • +
  • -
  • 1

Odszedłem.

 

Nadal wchodzę na forum, ale nie piszę postów.


#4 NEQU#

    Wszechwidzący

  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:239
  • Lokalizacja:Just-Frags.eu
Offline

Napisano 10.05.2016 18:31

Sprawdź, jeżeli nie zadziała to wrzuć includy od zombie moda.

 

Załączony plik  banchee premium.sma   10,77 KB  22 Ilość pobrań
  banchee premium.amxx


  • +
  • -
  • 1
b_350_20_FFAD41_E98100_000000_591F11.png
b_350_20_FFAD41_E98100_000000_591F11.png
b_350_20_FFAD41_E98100_000000_591F11.png
b_350_20_FFAD41_E98100_000000_591F11.png
b_350_20_FFAD41_E98100_000000_591F11.png

#5 MruczeQ

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:71
  • Imię:Kacper
  • Lokalizacja:Ełk
Offline

Napisano 12.05.2016 19:17

Po wypowiedzi wnioskuję, że próbowałeś coś wykombinować, ale Ci nie wyszło, dlatego nie dam gotowca, ale tipa ;>

 

 

https://amxx.pl/topi...zombie-premium/

Próbowałem ale odwaliłem lipę...

 

Sprawdź, jeżeli nie zadziała to wrzuć includy od zombie moda.

 

attachicon.gifbanchee premium.sma

nie działa 


  • +
  • -
  • 0

#6 NEQU#

    Wszechwidzący

  • Użytkownik

Reputacja: 21
Życzliwy

  • Postów:239
  • Lokalizacja:Just-Frags.eu
Offline

Napisano 12.05.2016 19:28

Podeslij pliki include do kompilacji to poprawie.


  • +
  • -
  • 0
b_350_20_FFAD41_E98100_000000_591F11.png
b_350_20_FFAD41_E98100_000000_591F11.png
b_350_20_FFAD41_E98100_000000_591F11.png
b_350_20_FFAD41_E98100_000000_591F11.png
b_350_20_FFAD41_E98100_000000_591F11.png

#7 MruczeQ

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:71
  • Imię:Kacper
  • Lokalizacja:Ełk
Offline

Napisano 13.05.2016 15:05

pełna nazwa pliku ;v


Użytkownik MruczeQ edytował ten post 13.05.2016 15:06

  • +
  • -
  • 0

#8 aSik

    Wszechobecny

  • Użytkownik

Reputacja: 81
Zaawansowany

  • Postów:449
  • Imię:Robert
  • Lokalizacja:Wrocław
Offline

Napisano 13.05.2016 15:14

pełna nazwa pliku ;v

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <xs>

amx, fakemeta, ham to "standardowe" i chodzi o zombieplague.inc.

 

Korzystając z rego możesz sobie sam poradzić ;>

https://amxx.pl/topi...zombie-premium/

 

Jakbyś czegoś jeszcze potrzebował, to pisz pw ;>


Użytkownik asik edytował ten post 13.05.2016 15:15

  • +
  • -
  • 0

Odszedłem.

 

Nadal wchodzę na forum, ale nie piszę postów.


#9 MruczeQ

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:71
  • Imię:Kacper
  • Lokalizacja:Ełk
Offline

Napisano 15.05.2016 10:23

/*================================================================================
 
---------------------------------------
-*- 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)
 
/**
 * 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[])
 
/**
 * 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
 

  • +
  • -
  • 0

#10 MruczeQ

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:71
  • Imię:Kacper
  • Lokalizacja:Ełk
Offline

Napisano 23.05.2016 19:41

Ref
  • +
  • -
  • 0

#11 MruczeQ

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:71
  • Imię:Kacper
  • Lokalizacja:Ełk
Offline

Napisano 11.06.2016 18:43

Ref
  • +
  • -
  • 0

#12 MruczeQ

    Pomocny

  • Autor tematu
  • Użytkownik

Reputacja: 0
zer0.

  • Postów:71
  • Imię:Kacper
  • Lokalizacja:Ełk
Offline

Napisano 22.06.2016 21:54

Ref
  • +
  • -
  • 0




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych