hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.05.24. 16:22



Jelenlévő felhasználók

Jelenleg 430 felhasználó van jelen :: 0 regisztrált, 0 rejtett és 430 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: nincs regisztrált felhasználó az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 10 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Zombi plugin hibák
HozzászólásElküldve: 2015.07.09. 11:08 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2015.03.11. 20:11
Hozzászólások: 915
Megköszönt másnak: 52 alkalommal
Megköszönték neki: 317 alkalommal
Sziasztok!
Mi lenne a hibája? :x
SMA Forráskód: [ Mindet kijelol ]
  1. /*================================================================================
  2.  
  3. ------------------------------------
  4. -*- [ZPA] Default Zombie Classes -*-
  5. ------------------------------------
  6.  
  7. ~~~~~~~~~~~~~~~
  8. - Description -
  9. ~~~~~~~~~~~~~~~
  10.  
  11. This plugin adds the default zombie classes to Zombie Plague Advance.
  12. Feel free to modify their attributes to your liking.
  13.  
  14. Note: If zombie classes are disabled, the first registered class
  15. will be used for all players (by default, Classic Zombie).
  16.  
  17. ================================================================================*/
  18.  
  19. #include <amxmodx>
  20. #include <fakemeta>
  21. #include <zombie_plague_advance>
  22.  
  23. /*================================================================================
  24.  [Plugin Customization]
  25. =================================================================================*/
  26.  
  27. // Classic Zombie Attributes
  28. new const zclass1_name[] = { "Classic Zombie" }
  29. new const zclass1_info[] = { "Elet+ Sebesseg+ Visszalokodes+" }
  30. new const zclass1_model[] = { "zombie_source" }
  31. new const zclass1_clawmodel[] = { "v_knife_zombie.mdl" }
  32. const zclass1_health = 1800
  33. const zclass1_speed = 190
  34. const Float:zclass1_gravity = 1.0
  35. const Float:zclass1_knockback = 1.0
  36.  
  37. // Raptor Zombie Attributes
  38. new const zclass2_name[] = { "Raptor Zombie" }
  39. new const zclass2_info[] = { "Elet-- Sebesseg++ Visszalokodes++" }
  40. new const zclass2_model[] = { "zombie_source" }
  41. new const zclass2_clawmodel[] = { "v_knife_zombie.mdl" }
  42. const zclass2_health = 900
  43. const zclass2_speed = 225
  44. const Float:zclass2_gravity = 1.0
  45. const Float:zclass2_knockback = 1.5
  46.  
  47. // Poison Zombie Attributes
  48. new const zclass3_name[] = { "Poison Zombie" }
  49. new const zclass3_info[] = { "Elet- Ugras+ Visszalokodes+" }
  50. new const zclass3_model[] = { "zombie_source" }
  51. new const zclass3_clawmodel[] = { "v_knife_zombie.mdl" }
  52. const zclass3_health = 1400
  53. const zclass3_speed = 190
  54. const Float:zclass3_gravity = 0.75
  55. const Float:zclass3_knockback = 1.25
  56.  
  57. // Big Zombie Attributes
  58. new const zclass4_name[] = { "Big Zombie" }
  59. new const zclass4_info[] = { "Elet++ Sebesseg- Visszalokodes--" }
  60. new const zclass4_model[] = { "zombie_source" }
  61. new const zclass4_clawmodel[] = { "v_knife_zombie.mdl" }
  62. const zclass4_health = 2700
  63. const zclass4_speed = 155
  64. const Float:zclass4_gravity = 1.0
  65. const Float:zclass4_knockback = 0.5
  66.  
  67. // Leech Zombie Attributes
  68. new const zclass5_name[] = { "Leech Zombie" }
  69. new const zclass5_info[] = { "Elet- Visszalokodes+" }
  70. new const zclass5_model[] = { "zombie_source" }
  71. new const zclass5_clawmodel[] = { "v_knife_zombie.mdl" }
  72. const zclass5_health = 1300
  73. const zclass5_speed = 190
  74. const Float:zclass5_gravity = 1.0
  75. const Float:zclass5_knockback = 1.25
  76. const zclass5_infecthp = 200 // extra hp for infections
  77.  
  78. /*============================================================================*/
  79.  
  80. // Class IDs
  81. new g_zclass_leech
  82.  
  83. // Zombie Classes MUST be registered on plugin_precache
  84. public plugin_precache()
  85. {
  86. register_plugin("[ZP] Default Zombie Classes", "4.3", "MeRcyLeZZ")
  87.  
  88. // Register all classes
  89. zp_register_zombie_class(zclass1_name, zclass1_info, zclass1_model, zclass1_clawmodel, zclass1_health, zclass1_speed, zclass1_gravity, zclass1_knockback)
  90. zp_register_zombie_class(zclass2_name, zclass2_info, zclass2_model, zclass2_clawmodel, zclass2_health, zclass2_speed, zclass2_gravity, zclass2_knockback)
  91. zp_register_zombie_class(zclass3_name, zclass3_info, zclass3_model, zclass3_clawmodel, zclass3_health, zclass3_speed, zclass3_gravity, zclass3_knockback)
  92. zp_register_zombie_class(zclass4_name, zclass4_info, zclass4_model, zclass4_clawmodel, zclass4_health, zclass4_speed, zclass4_gravity, zclass4_knockback)
  93. g_zclass_leech = zp_register_zombie_class(zclass5_name, zclass5_info, zclass5_model, zclass5_clawmodel, zclass5_health, zclass5_speed, zclass5_gravity, zclass5_knockback)
  94. }
  95.  
  96. // User Infected forward
  97. public zp_user_infected_post(id, infector)
  98. {
  99. // If attacker is a leech zombie, gets extra hp
  100. if (zp_get_user_zombie_class(infector) == g_zclass_leech)
  101. set_pev(infector, pev_health, float(pev(infector, pev_health) + zclass5_infecthp))
  102. }

 

SMA Forráskód: [ Mindet kijelol ]
  1. /***************************************************************************\
  2. ========================================
  3. * || [ZPA] Example Game Mode v1.6 || *
  4. ========================================
  5.  
  6. -------------------
  7. *||DESCRIPTION||*
  8. -------------------
  9.  
  10. This is an example game mode in which there are half Assassins
  11. and half Snipers. You can use this plugin as a guide on how to
  12. make custom game modes for Zombie Plague Advance.
  13.  
  14. -------------
  15. *||CVARS||*
  16. -------------
  17.  
  18. - zp_avsm_minplayers 2
  19. - Minimum players required for this game mode to be
  20. activated
  21.  
  22. - zp_avsm_sniper_hp 1.5
  23. - Snipers HP multiplier
  24.  
  25. - zp_avsm_assassin_hp 1.0
  26. - Assassins HP multiplier
  27.  
  28. - zp_avsm_inf_ratio 0.5
  29. - Infection ratio of this game mode i.e how many players
  30. will turn into assassins [Total players * infection ratio]
  31.  
  32. \***************************************************************************/
  33.  
  34. #include < amxmodx >
  35. #include < fun >
  36. #include < zombie_plague_advance >
  37.  
  38. /************************************************************\
  39. | Customizations Section |
  40. | You can edit here according to your liking |
  41. \************************************************************/
  42.  
  43. // This is the chance value according to which this game mode will be called
  44. // The higher the value the lesser the chance of calling this game mode
  45. new const g_chance = 15
  46.  
  47. // This is the access flag required to start the game mode
  48. // through the admin menu. Look in users.ini for more details
  49. new const g_access_flag[] = "c"
  50.  
  51. // This is the sound which is played when the game mode is triggered
  52. // Add as many as you want [Randomly chosen if more than one]
  53. new const g_play_sounds[][] =
  54. {
  55. "zombie_plague/nemesis1.wav" ,
  56. "zombie_plague/survivor1.wav"
  57. }
  58.  
  59. // Comment the following line to disable ambience sounds
  60. // Just add two slashes ( // )
  61. #define AMBIENCE_SOUNDS
  62.  
  63. #if defined AMBIENCE_SOUNDS
  64. // Ambience Sounds (only .wav and .mp3 formats supported)
  65. // Add as many as you want [Randomly chosen if more than one]
  66. new const g_sound_ambience[][] =
  67. {
  68. "zombie_plague/ambience.wav"
  69. }
  70.  
  71. // Duration in seconds of each sound
  72. new const Float:g_sound_ambience_duration[] = { 58.0 , 56.0 }
  73. #endif
  74.  
  75. /************************************************************\
  76. | Customizations Ends Here..!! |
  77. | You can edit the cvars in the plugin init |
  78. \************************************************************/
  79.  
  80. // Variables
  81. new g_gameid, g_maxplayers, cvar_minplayers, cvar_ratio, cvar_sniperhp, cvar_assahp, g_msg_sync
  82.  
  83. // Ambience sounds task
  84. #define TASK_AMB 3256
  85.  
  86. public plugin_init( )
  87. {
  88. // Plugin registeration.
  89. register_plugin( "[ZP] Assassin vs Snipers Mode","1.0", "@bdul!" )
  90.  
  91. // Register some cvars
  92. // Edit these according to your liking
  93. cvar_minplayers = register_cvar("zp_avsm_minplayers", "2")
  94. cvar_sniperhp = register_cvar("zp_avsm_sniper_hp", "1.5")
  95. cvar_assahp = register_cvar("zp_avsm_assassin_hp", "1.0")
  96. cvar_ratio = register_cvar("zp_avsm_inf_ratio", "0.5")
  97.  
  98. // Get maxplayers
  99. g_maxplayers = get_maxplayers( )
  100.  
  101. // Hud stuff
  102. g_msg_sync = CreateHudSyncObj()
  103. }
  104.  
  105. // Game modes MUST be registered in plugin precache ONLY
  106. public plugin_precache( )
  107. {
  108. // Read the access flag
  109. new access_flag = read_flags( g_access_flag )
  110. new i
  111.  
  112. // Precache the play sounds
  113. for (i = 0; i < sizeof g_play_sounds; i++)
  114. precache_sound( g_play_sounds[i] )
  115.  
  116. // Precache the ambience sounds
  117. #if defined AMBIENCE_SOUNDS
  118. new sound[100]
  119. for (i = 0; i < sizeof g_sound_ambience; i++)
  120. {
  121. if (equal(g_sound_ambience[i][strlen(g_sound_ambience[i])-4], ".mp3"))
  122. {
  123. formatex(sound, sizeof sound - 1, "sound/%s", g_sound_ambience[i])
  124. precache_generic( sound )
  125. }
  126. else
  127. {
  128. precache_sound( g_sound_ambience[i] )
  129. }
  130. }
  131. #endif
  132.  
  133. // Register our game mode
  134. g_gameid = zp_register_game_mode( "Assassin vs Snipers Mode", access_flag, g_chance, 0, ZP_DM_BALANCE )
  135. }
  136.  
  137. // Player spawn post
  138. public zp_player_spawn_post( id )
  139. {
  140. // Check for current mode
  141. if( zp_get_current_mode() == g_gameid )
  142. {
  143. // Check if the player is a zombie
  144. if( zp_get_user_zombie( id ))
  145. {
  146. // Make him an assassin instead
  147. zp_make_user_assassin( id )
  148.  
  149. // Set his health
  150. set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) )
  151. }
  152. else
  153. {
  154. // Make him a sniper
  155. zp_make_user_sniper( id )
  156.  
  157. // Set his health
  158. set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
  159. }
  160. }
  161. }
  162.  
  163. public zp_round_started_pre( game )
  164. {
  165. // Check if it is our game mode
  166. if( game == g_gameid )
  167. {
  168. // Check for min players
  169. if( fn_get_alive_players() < get_pcvar_num(cvar_minplayers) )
  170. {
  171. /**
  172. * Note:
  173. * This very necessary, you should return ZP_PLUGIN_HANDLED if
  174. * some conditions required by your game mode are not met
  175. * This will inform the main plugin that you have rejected
  176. * the offer and so the main plugin will allow other game modes
  177. * to be given a chance
  178. */
  179. return ZP_PLUGIN_HANDLED
  180. }
  181. // Start our new mode
  182. start_avs_mode( )
  183. }
  184. // Make the compiler happy =)
  185. return PLUGIN_CONTINUE
  186. }
  187.  
  188. public zp_round_started( game, id )
  189. {
  190. // Check if it is our game mode
  191. if( game == g_gameid )
  192. {
  193. // Show HUD notice
  194. set_hudmessage(221, 156, 21, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
  195. ShowSyncHudMsg(0, g_msg_sync, "Assassins vs Snipers Mod !!!")
  196.  
  197. // Play the starting sound
  198. client_cmd(0, "spk ^"%s^"", g_play_sounds[ random_num(0, sizeof g_play_sounds -1) ] )
  199.  
  200. // Remove ambience task affects
  201. remove_task( TASK_AMB )
  202.  
  203. // Set task to start ambience sounds
  204. #if defined AMBIENCE_SOUNDS
  205. set_task( 2.0, "start_ambience_sounds", TASK_AMB )
  206. #endif
  207. }
  208. }
  209.  
  210. public zp_game_mode_selected( gameid, id )
  211. {
  212. // Check if our game mode was called
  213. if( gameid == g_gameid )
  214. start_avs_mode( )
  215.  
  216. // Make the compiler happy again =)
  217. return PLUGIN_CONTINUE
  218. }
  219.  
  220. // This function contains the whole code behind this game mode
  221. start_avs_mode( )
  222. {
  223. // Create and initialize some important vars
  224. static i_assassins, i_max_assassins, id, i_alive
  225. i_alive = fn_get_alive_players()
  226. id = 0
  227.  
  228. // Get the no of players we have to turn into assassins
  229. i_max_assassins = floatround( ( i_alive * get_pcvar_float( cvar_ratio ) ), floatround_ceil )
  230. i_assassins = 0
  231.  
  232. // Randomly turn players into Assassins
  233. while (i_assassins < i_max_assassins)
  234. {
  235. // Keep looping through all players
  236. if ( (++id) > g_maxplayers) id = 1
  237.  
  238. // Dead
  239. if ( !is_user_alive(id) )
  240. continue;
  241.  
  242. // Random chance
  243. if (random_num(1, 5) == 1)
  244. {
  245. // Make user assassin
  246. zp_make_user_assassin(id)
  247.  
  248. // Set his health
  249. set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_assahp)) )
  250.  
  251. // Increase counter
  252. i_assassins++
  253. }
  254. }
  255.  
  256. // Turn the remaining players into snipers
  257. for (id = 1; id <= g_maxplayers; id++)
  258. {
  259. // Only those of them who are alive and are not assassins
  260. if ( !is_user_alive(id) || zp_get_user_assassin(id) )
  261. continue;
  262.  
  263. // Turn into a sniper
  264. zp_make_user_sniper(id)
  265.  
  266. // Set his health
  267. set_user_health( id, floatround(get_user_health(id) * get_pcvar_float(cvar_sniperhp)) )
  268. }
  269. }
  270.  
  271. #if defined AMBIENCE_SOUNDS
  272. public start_ambience_sounds( )
  273. {
  274. // Variables
  275. static amb_sound[64], sound, Float:duration
  276.  
  277. // Select our ambience sound
  278. sound = random_num( 0, sizeof g_sound_ambience - 1 )
  279. copy( amb_sound, sizeof amb_sound - 1 , g_sound_ambience[ sound ] )
  280. duration = g_sound_ambience_duration[ sound ]
  281.  
  282. // Check whether it's a wav or mp3, then play it on clients
  283. if ( equal( amb_sound[ strlen( amb_sound ) - 4 ], ".mp3" ) )
  284. client_cmd( 0, "mp3 play ^"sound/%s^"", amb_sound )
  285. else
  286. client_cmd( 0, "spk ^"%s^"", sound )
  287.  
  288. // Start the ambience sounds
  289. set_task( duration, "start_ambience_sounds", TASK_AMB )
  290. }
  291. public zp_round_ended( winteam )
  292. {
  293. // Stop ambience sounds on round end
  294. remove_task( TASK_AMB )
  295. }
  296. #endif
  297.  
  298. // This function returns the no. of alive players
  299. // Feel free to use this in your plugin when you
  300. // are making your own game modes.
  301. fn_get_alive_players( )
  302. {
  303. static i_alive, id
  304. i_alive = 0
  305.  
  306. for ( id = 1; id <= g_maxplayers; id++ )
  307. {
  308. if( is_user_alive( id ) )
  309. i_alive++
  310. }
  311. return i_alive;
  312. }
  313.  

_________________
viewtopic.php?f=101&t=25611#p184899
viewtopic.php?f=114&t=29544&p=209471#p209431


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 09:09 
Offline
Nagyúr
Avatar

Csatlakozott: 2012.09.23. 09:50
Hozzászólások: 569
Megköszönt másnak: 76 alkalommal
Megköszönték neki: 37 alkalommal
Gondolom hiányzik a zp inc-ed.
Nekem lefordult hibátlanul.

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 10:48 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2015.03.11. 20:11
Hozzászólások: 915
Megköszönt másnak: 52 alkalommal
Megköszönték neki: 317 alkalommal
Applee írta:
Gondolom hiányzik a zp inc-ed.
Nekem lefordult hibátlanul.


Megvan minden hozzá.. Egyszerűen nem fordulnak le

_________________
viewtopic.php?f=101&t=25611#p184899
viewtopic.php?f=114&t=29544&p=209471#p209431


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 17:19 
Offline
Jómunkásember
Avatar

Csatlakozott: 2013.09.21. 12:03
Hozzászólások: 318
Megköszönt másnak: 31 alkalommal
Megköszönték neki: 30 alkalommal
Tökéletesen lefut mindkettő! A pluginnal semmi gond, másold be az includokat!

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 17:55 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2015.03.11. 20:11
Hozzászólások: 915
Megköszönt másnak: 52 alkalommal
Megköszönték neki: 317 alkalommal
lis789 írta:
Tökéletesen lefut mindkettő! A pluginnal semmi gond, másold be az includokat!


Tessék.. Azzal van gond, hogy nekem le se fordulnak..:D

1.
Kód:
/***************************************************************************\
      ===============================================
       * || Zombie Plague Advance Includes File || *
      ===============================================

   
   ---------------
    *||How to ||*
   ---------------
   
   To make use of the Zombie Plague Advance API features in your plugin,
   just add the following line at the beginning of your script:
   
   #include <zombie_plague_advance>
   
   ---------------
    *||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:
   [These suffixes are only available in some forwards]
   
   * _pre  : means the forward will be called BEFORE the event happens
   * _post : means it will be called AFTER the event takes place
   
\***************************************************************************/

#if defined _zombie_plague_advance_included
  #endinput
#endif
#define _zombie_plague_advance_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)
#define ZP_TEAM_SNIPER (1<<4)
#define ZP_TEAM_ASSASSIN (1<<5)

/* Death Match modes for zp_register_game_mode */
enum
{
   ZP_DM_NONE = 0,   // Disable death match during the custom mode round
   ZP_DM_HUMAN,    // Respawn as human only
   ZP_DM_ZOMBIE,    // Respawn as zombie only
   ZP_DM_RANDOM,   // Respawn randomly as humans or zombies
   ZP_DM_BALANCE   // Respawn as humans or zombies to keep both team balanced
}

/* Game modes for zp_round_started() */
enum
{
   MODE_NONE = 0,
   MODE_INFECTION,
   MODE_NEMESIS,
   MODE_ASSASSIN,
   MODE_SURVIVOR,
   MODE_SNIPER,
   MODE_SWARM,
   MODE_MULTI,
   MODE_PLAGUE,
   MODE_LNJ
}

/* 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/sniper.
 *
 * @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/sniper.
 *
 * @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 a player is a sniper.
 *
 * @param id      Player index.
 * @return      True if it is, false otherwise.
 */
native zp_get_user_sniper(id)

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

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

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

/**
 * 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 whether the current round is a Armageddon round.
 *
 * @return      True if it is, false otherwise.
 */
native zp_is_lnj_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()

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

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

/**
 * Returns number of alive snipers.
 *
 * @return      Sniper count.
 */
native zp_get_sniper_count()

/**
 * Returns number of alive assassins.
 *
 * @return      Assassin count.
 */
native zp_get_assassin_count()

/**
 * Returns the current game mode ID
 *
 * Note: For default game modes you can use, for eg. MODE_SWARM,
 * to check if the current round is swarm mode.
 *
 * Note: For custom game modes you must have the custom game
 * mode ID to detect it
 *
 * @return      Current game mode ID
 */
native zp_get_current_mode()

/**
 * Allows you to properly retrieve a player's model
 *
 * Note: You should use this native for retrieving a player's
 * current model instead of other methods
 *
 * Note: The model name which is retrieved is the model's folder
 * name for eg: zombie_source and is not the model's actual name.
 *
 * @param id       Player index who's model is to be retrieved.
 * @param model      String in which the model name will be copied.
 * @param maxlen   Number of characters (of the string) to copy.
 */
native zp_get_user_model(id, const model[], maxlen)

/**
 * Properly sets the given model for the player.
 *
 * Note: You should use this native for setting a player's model
 * instead of other methods.
 *
 * Note: The model name which is passed should be the model's folder
 * name for eg: zombie_source and the folder should contain the
 * actual model file in it eg: zombie_source.mdl
 *
 * Note: The model you are setting should be precached in the
 * sub-plugin using the plugin_precache forward to prevent problems.
 *
 * Note: It is highly advised to set the models with an additional
 * delay during round start to prevent SVC_BAD errors/kicks.
 *
 * @param id       Player index who's model needs to be set.
 * @param model      String containing the model folder name.
 */
native zp_set_user_model(id, const model[])

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

/**
 * Registers a custom game mode which will be added to the admin menu of ZP
 *
 * Note: The returned game mode ID can later be used to detect the game mode
 * which is called in zp_round_started_pre. There you can start the game mode
 * externally by using this game mode ID.
 *
 * @param name       The game mode's name which will help in identifing it.
 * @param flags      Access flags required by the admins to start this game mode.
 * @param chance   Chance level of this game mode. (1 in X).
 * @param allow      Whether to permit infection after zombie to player attacks.
 * @param dm_mode   Death match mode which will be used during this game.
 * @return      An internal game mode ID or -1 on failure.
 */
native zp_register_game_mode( const name[], flags, chance, allow, dm_mode)

/**
 * 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, ZP_TEAM_SURVIVOR, ZP_TEAM_ASSASSIN and ZP_TEAM_SNIPER
 * can be used to make an item available to Nemesis,
 * Survivors, Assassins and Snipers.
 *
 * @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)

/**
 * 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 before the ZP round starts. This is only
 * called for custom game modes.
 *
 * Note: The custom game mode id can be used to start
 * the game mode externally
 *
 * Note: returning ZP_PLUGIN_HANDLED will cause the
 * game mode to be blocked and other game modes will
 * be given a chance.
 *
 * @param gameid   Custom mode id which is called
 */
forward zp_round_started_pre(gameid)

/**
 * 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)
forward zp_user_humanized_pre(id, sniper)
forward zp_user_humanized_post(id, sniper)

/**
 * 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)
forward zp_user_humanize_attempt(id, sniper)

/**
 * Called when an admin selects a custom game mode from the ZP admin menu.
 *
 * Note: You should trigger the custom game mode here with out any checks
 *
 * @param gameid   Internal custom game mode ID
 * @param id      Player index who selected the game mode
 */
forward zp_game_mode_selected(gameid, id)

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

/**
 * Called when a player spawns. This is also called for CZ bots
 * which are spawning.
 *
 * Note: You should use this, instead of other spawn forwards,
 * for changing a player's class after the player's spawn.
 *
 * @param id      Player index who has spawned
 */
forward zp_player_spawn_post(id, resp_zombie)

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


2.
Kód:
/*================================================================================
   
   ---------------------------------------
   -*- Zombie Plague 4.3 Includes File -*-
   ---------------------------------------
   
   -------------------------------------------------------
   -*- Dont use this include file for your plugins     -*-
   -*- This file is for backwards compatibility only.  -*-
   -*- Use the zombie_plague_advance.inc file insteead -*-
   -------------------------------------------------------
   
=================================================================================*/

#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


3.
Kód:
/*================================================================================
   
   -------------------------------------------------------
   -*- Zombie Plague 4.3 + New Modes 1.3 Includes File -*-
   -------------------------------------------------------
   
   -------------------------------------------------------
   -*- Dont use this include file for your plugins     -*-
   -*- This file is for backwards compatibility only.  -*-
   -*- Use the zombie_plague_advance.inc file insteead -*-
   -------------------------------------------------------
   
=================================================================================*/

#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)
#define ZP_TEAM_SNIPER (1<<4)
#define ZP_TEAM_ASSASSIN (1<<5)

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

/* 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/sniper.
 *
 * @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/sniper.
 *
 * @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 a player is a sniper.
 *
 * @param id      Player index.
 * @return      True if it is, false otherwise.
 */
native zp_get_user_sniper(id)

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

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

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

/**
 * 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 whether the current round is a Armageddon round.
 *
 * @return      True if it is, false otherwise.
 */
native zp_is_lnj_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()

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

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

/**
 * Returns number of alive snipers.
 *
 * @return      Sniper count.
 */
native zp_get_sniper_count()

/**
 * Returns number of alive assassins.
 *
 * @return      Assassin count.
 */
native zp_get_assassin_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, ZP_TEAM_SURVIVOR, ZP_TEAM_ASSASSIN and ZP_TEAM_SNIPER
 * can be used to make an item available to Nemesis,
 * Survivors, Assassins and Snipers.
 *
 * @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)
forward zp_user_humanized_pre(id, sniper)
forward zp_user_humanized_post(id, sniper)

/**
 * 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)
forward zp_user_humanize_attempt(id, sniper)

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

_________________
viewtopic.php?f=101&t=25611#p184899
viewtopic.php?f=114&t=29544&p=209471#p209431


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 18:00 
Offline
Jómunkásember
Avatar

Csatlakozott: 2015.04.18. 17:14
Hozzászólások: 454
Megköszönt másnak: 48 alkalommal
Megköszönték neki: 32 alkalommal
Tessék ez az include kell neked :


Csatolmányok:
zombie_plague_advance.inc [16.84 KiB]
Letöltve 31 alkalommal.

_________________
Nem Toretto vagyok!!! hanem s[T]* Levii (És le lehet szállni a Torreto-zásról)

Ts3 Ip: ts.beathost.ml:10005
Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 18:08 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2015.03.11. 20:11
Hozzászólások: 915
Megköszönt másnak: 52 alkalommal
Megköszönték neki: 317 alkalommal
DecToR írta:
Tessék ez az include kell neked :


De nekem az SMA nem fordul le itt a fórumon.... :D

_________________
viewtopic.php?f=101&t=25611#p184899
viewtopic.php?f=114&t=29544&p=209471#p209431


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 18:33 
Offline
Jómunkásember
Avatar

Csatlakozott: 2015.04.18. 17:14
Hozzászólások: 454
Megköszönt másnak: 48 alkalommal
Megköszönték neki: 32 alkalommal
SmaCk írta:
DecToR írta:
Tessék ez az include kell neked :


De nekem az SMA nem fordul le itt a fórumon.... :D


Megoldás :
SMX Forráskód: [ Mindet kijelol ]
  1. AMXX-studio

_________________
Nem Toretto vagyok!!! hanem s[T]* Levii (És le lehet szállni a Torreto-zásról)

Ts3 Ip: ts.beathost.ml:10005


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 18:33 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2014.03.07. 14:55
Hozzászólások: 939
Megköszönt másnak: 38 alkalommal
Megköszönték neki: 95 alkalommal
mert a forditó nem tartalmazza az includeot :) anélkül nem fordul le.

_________________
Hmm.
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zombi plugin hibák
HozzászólásElküldve: 2015.07.12. 18:39 
Offline
Jómunkásember
Avatar

Csatlakozott: 2015.04.18. 17:14
Hozzászólások: 454
Megköszönt másnak: 48 alkalommal
Megköszönték neki: 32 alkalommal
AMXX-studio ba ezt csináld meg:

1. Telepítsd fel az AMXX-studio-t
2. Keresd meg a mappáját. Nekem: c/program_files/AMX MOD X

3. nyisd meg

4. menny rá a files-re

5. menny rá a base-ra

6. menny rá a scripting-re

7. menny rá az include mappára

8. Húzd be oda amit csatoltam inc-et

_________________
Nem Toretto vagyok!!! hanem s[T]* Levii (És le lehet szállni a Torreto-zásról)

Ts3 Ip: ts.beathost.ml:10005


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 10 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 88 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole