下面是引用 史來姆 於 2010-08-24 18:07 發表的 :
請問你可不可以列出你該sma的所有內容?
我想看看有沒有問題
沒問題
如下:
====
-----------------------------------
-*- [ZP] Default Zombie Classes -*-
-----------------------------------
~~~~~~~~~~~~~~~
- Description -
~~~~~~~~~~~~~~~
This plugin adds the default zombie classes to Zombie Plague.
Feel free to modify their attributes to your liking.
Note: If zombie classes are disabled, the first registered class
will be used for all players (by default, Classic Zombie).
================================================================================*/
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
/*================================================================================
[Plugin Customization]
=================================================================================*/
// Classic Zombie Atributes
new const zclass1_name[] = { "一般喪屍" }
new const zclass1_info[] = { "能力平均" } //類型說明
new const zclass1_model[] = { "zombie_source" } //人物模組
new const zclass1_clawmodel[] = { "v_knife_zombie.mdl" } //手的模組
const zclass1_health = 2000
const zclass1_speed = 220
const Float:zclass1_gravity = 1.0
const Float:zclass1_knockback = 1.0
// Raptor Zombie Atributes
new const zclass2_name[] = { "快速喪屍" }
new const zclass2_info[] = { "移動速度非常快" } //類型說明
new const zclass2_model[] = { "zombie_fast" } //人物模組
new const zclass2_clawmodel[] = { "v_knife_zombie.mdl" } //手的模組
const zclass2_health = 1600
const zclass2_speed = 280
const Float:zclass2_gravity = 1.0
const Float:zclass2_knockback = 1.75
// Poison Zombie Atributes
new const zclass3_name[] = { "跳躍喪屍" }
new const zclass3_info[] = { "跳躍能力特別高" } //類型說明
new const zclass3_model[] = { "zombie_resident2" } //人物模組
new const zclass3_clawmodel[] = { "v_knife_zombie.mdl" } //手的模組
const zclass3_health = 1800
const zclass3_speed = 200
const Float:zclass3_gravity = 0.40
const Float:zclass3_knockback = 1.25
// Big Zombie Atributes
new const zclass4_name[] = { "血牛喪屍" }
new const zclass4_info[] = { "擁有很高的HP數值" } //類型說明
new const zclass4_model[] = { "zombie_fat" } //人物模組
new const zclass4_clawmodel[] = { "v_knife_zombie.mdl" } //手的模組
const zclass4_health = 3800
const zclass4_speed = 170
const Float:zclass4_gravity = 1.0
const Float:zclass4_knockback = 0.5
// Leech Zombie Atributes
new const zclass5_name[] = { "吸血喪屍" }
new const zclass5_info[] = { "傳染人類後會多加300HP" } //類型說明
new const zclass5_model[] = { "nemesis2" } //人物模組
new const zclass5_clawmodel[] = { "v_knife_zombie.mdl" } //手的模組
const zclass5_health = 1800
const zclass5_speed = 240
const Float:zclass5_gravity = 1.0
const Float:zclass5_knockback = 1.50
const zclass5_infecthp = 300 // 傳染後額外得到的血量
/*============================================================================*/
// Class IDs
new g_zclass_leech
// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
register_plugin("[ZP] Default Zombie Classes", "4.1", "MeRcyLeZZ")
// Register all classes
zp_register_zombie_class(zclass1_name, zclass1_info, zclass1_model, zclass1_clawmodel, zclass1_health, zclass1_speed, zclass1_gravity, zclass1_knockback)
zp_register_zombie_class(zclass2_name, zclass2_info, zclass2_model, zclass2_clawmodel, zclass2_health, zclass2_speed, zclass2_gravity, zclass2_knockback)
zp_register_zombie_class(zclass3_name, zclass3_info, zclass3_model, zclass3_clawmodel, zclass3_health, zclass3_speed, zclass3_gravity, zclass3_knockback)
zp_register_zombie_class(zclass4_name, zclass4_info, zclass4_model, zclass4_clawmodel, zclass4_health, zclass4_speed, zclass4_gravity, zclass4_knockback)
g_zclass_leech = zp_register_zombie_class(zclass5_name, zclass5_info, zclass5_model, zclass5_clawmodel, zclass5_health, zclass5_speed, zclass5_gravity, zclass5_knockback)
}
// User Infected forward
public zp_user_infected_post(id, infector)
{
// If attacker is a leech zombie, gets extra hp
if (zp_get_user_zombie_class(infector) == g_zclass_leech) {
set_pev(infector, pev_health, float(pev(infector, pev_health) + zclass5_infecthp))
} else {
if (zp_get_user_nemesis(id))
set_pev(infector, pev_health, float(pev(infector, pev_health)))
}
}