dias
Mega Man
Dành Cho Zombie Plague 4.3 Thôi Nha 
Tôi sẽ cho bạn thấy làm thế nào để làm một class zombie đơn giản! chúng ta sẽ thực hiện một Class Zombie được gọi là "Gravity Zombie" và sẽ có trọng lực thấp.
Bước 1. chúng ta cần phải bao gồm "ZombiePlague"
Dòng đầu của file sma phải có. ( Bao Gồm zombie plague )
Bước 2. Là làm các thuộc tính Cho Zombie
Bước 3. Make a simple "new" code for teh next entry.
Bước 4. Đăng kí 1 class zombie vào amx
Bước 5. Làm Cho Class này khi dc player chọn sẽ hiển thị 1 Message
Khi XOng ta sẽ dc thế này:
Đây là creat 1 loại zombie cơ bản. Còn creat 1 loại giống smoker, ghost,... thì phải pro hơn



Ai xem không hiểu thì xem bải = Tiếng anh:
http://forums.alliedmods.net/showthread.php?t=110938&highlight=Zombie

Tôi sẽ cho bạn thấy làm thế nào để làm một class zombie đơn giản! chúng ta sẽ thực hiện một Class Zombie được gọi là "Gravity Zombie" và sẽ có trọng lực thấp.
Bước 1. chúng ta cần phải bao gồm "ZombiePlague"
Dòng đầu của file sma phải có. ( Bao Gồm zombie plague )
Mã:
#include <amxmodx>
#include <zombieplague>
Bước 2. Là làm các thuộc tính Cho Zombie
Mã:
// Zombie Attributes
new const zclass_name[] = { "Gravity Zombie" } // Tên Của ZOmbie
new const zclass_info[] = { "Low grav -HP" } // Mô Tả Zombie
new const zclass_model[] = { "zombie_Source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model (cái hand ấy)
const zclass_health = 800 // Lượng Máu
const zclass_speed = 200 // Tốc Độ
const Float:zclass_gravity = 0.4 // Trọng Lượng
const Float:zclass_knockback = 0.6 // Độ Đẩy Lùi
Bước 3. Make a simple "new" code for teh next entry.
Mã:
// Class IDs
new g_zclassid1
Bước 4. Đăng kí 1 class zombie vào amx
Mã:
// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
register_plugin("[ZP] Zombie Class: Gravity Zombie", "1.0", "Zombiezzz")
// Register the new class and store ID for reference
g_zclassid1 = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
Bước 5. Làm Cho Class này khi dc player chọn sẽ hiển thị 1 Message
Mã:
public zp_user_infected_post ( id, infector )
{
if (zp_get_user_zombie_class(id) == g_zclassid1)
{
client_print(id, print_chat, "[ZP] You Have Choosen Gravity Zombie")
}
}
Khi XOng ta sẽ dc thế này:
Mã:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <zombieplague>
// Zombie Attributes
new const zclass_name[] = { "Gravity Zombie" } // name
new const zclass_info[] = { "Low Grav -HP" } // description
new const zclass_model[] = { "zombie_source" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 800 // health
const zclass_speed = 200 // speed
const Float:zclass_gravity = 0.5 // gravity
const Float:zclass_knockback = 0.6 // knockback
// Class IDs
new g_zclassid1
// Zombie Classes MUST be registered on plugin_precache
public plugin_precache()
{
register_plugin("[ZP] Zombie Class: Gravity Zombie", "1.0", "Zombiezzz")
// Register the new class and store ID for reference
g_zclassid1 = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public zp_user_infected_post ( id, infector )
{
if (zp_get_user_zombie_class(id) == g_zclassid1)
{
client_print(id, print_chat, "[ZP] You Have Choosen Gravity Zombie")
}
}
Đây là creat 1 loại zombie cơ bản. Còn creat 1 loại giống smoker, ghost,... thì phải pro hơn




Ai xem không hiểu thì xem bải = Tiếng anh:
http://forums.alliedmods.net/showthread.php?t=110938&highlight=Zombie


. Đáng lẽ phải ghi tên topic là : Hướng dẫn tạo class zombie cho newbie chứ
?