- 29/1/10
- 1,430
- 66
ai xem hộ cái plugins này với ko complied dc http://share.megaplus.vn/dl.php/2534680
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
set_hudmessage(0,100,0, 0.22, 0.87, _, 0.2, 0.2)
ShowSyncHudMsg(id, g_SyncHud, "Evolution Point: %s / 5", g_point_zombie)
Mấy bác cho hỏi.
Mình làm cái Evolution Cho Bio roài nhưng mà có chút vấn đề ở show hud
PHP:set_hudmessage(0,100,0, 0.22, 0.87, _, 0.2, 0.2) ShowSyncHudMsg(id, g_SyncHud, "Evolution Point: %s / 5", g_point_zombie)
cái chỗ "%s" là chỗ hiển thị số point đang có
Hud thì đã dc, và khi lây nhiễm 5 còn thì có thể evolution nhưng mà cái chỗ Evolution Point thì nó hiện thế này
Uploading...
Chả thấy cái số báo số point đang có đâu cả. Sửa thế nào vậy mấy bác ?
ai xem hộ cái plugins này với ko complied dc http://share.megaplus.vn/dl.php/2534680
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <zombieplague>
new bool:g_p_alive[33]
new g_max_players
new nhp[33]
new g_heal
#define HEALTIME 1.0 // edit heal time vao` day !!!
public plugin_precache()
{
g_heal=precache_model("sprites/zb3_heal.spr")
}
public plugin_init(){
register_plugin("AutoRegeneration", "1.0", "Sylwester")
RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1)
RegisterHam(Ham_Killed, "player", "Player_Killed" )
g_max_players = get_maxplayers()
set_task(1.0, "regen", 2152, _, _, "b")
RegisterHam(Ham_TakeDamage, "player", "fw_takedamage")
}
public fw_takedamage(victim, inflictor, attacker, Float:damage, bits)
{
if (attacker == inflictor)
{
if (zp_get_user_zombie(attacker))
set_task(HEALTIME, "heal_thing", victim)
}
}
public Player_Spawn(id){
if(!is_user_alive(id))
return
g_p_alive[id] = true
}
public Player_Killed(id){
g_p_alive[id] = false
}
public client_disconnect(id){
g_p_alive[id] = false
}
public regen(){
new victim
victim = read_data(2)
static id, hp
for(id=1; id<=g_max_players; id++){
if(!g_p_alive[id])
continue
nhp[id] = zp_get_zombie_maxhealth(id);
hp = get_user_health(id)
if(hp >= nhp[id])
{
set_user_health(id, hp+100)
set_task(0.001, "fire", victim)
}
}
}
fire_zombie(origin[3])
{
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte(TE_SPRITE)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2]+=30)
write_short(g_heal)
write_byte(8)
write_byte(255)
message_end()
}
public fire(victim)
{
new origin[3]
get_user_origin(victim,origin)
fire_zombie(origin)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
*/
lêch dòng nh` quá, tâp đọc các error đi
nhớ edit cái HEALTIME...
PHP:#include <amxmodx> #include <hamsandwich> #include <fun> #include <zombieplague> new bool:g_p_alive[33] new g_max_players new nhp[33] new g_heal #define HEALTIME 1.0 // edit heal time vao` day !!! public plugin_precache() { g_heal=precache_model("sprites/zb3_heal.spr") } public plugin_init(){ register_plugin("AutoRegeneration", "1.0", "Sylwester") RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1) RegisterHam(Ham_Killed, "player", "Player_Killed" ) g_max_players = get_maxplayers() set_task(1.0, "regen", 2152, _, _, "b") RegisterHam(Ham_TakeDamage, "player", "fw_takedamage") } public fw_takedamage(victim, inflictor, attacker, Float:damage, bits) { if (attacker == inflictor) { if (zp_get_user_zombie(attacker)) set_task(HEALTIME, "heal_thing", victim) } } public Player_Spawn(id){ if(!is_user_alive(id)) return g_p_alive[id] = true } public Player_Killed(id){ g_p_alive[id] = false } public client_disconnect(id){ g_p_alive[id] = false } public regen(){ new victim victim = read_data(2) static id, hp for(id=1; id<=g_max_players; id++){ if(!g_p_alive[id]) continue nhp[id] = zp_get_zombie_maxhealth(id); hp = get_user_health(id) if(hp >= nhp[id]) { set_user_health(id, hp+100) set_task(0.001, "fire", victim) } } } fire_zombie(origin[3]) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(TE_SPRITE) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+=30) write_short(g_heal) write_byte(8) write_byte(255) message_end() } public fire(victim) { new origin[3] get_user_origin(victim,origin) fire_zombie(origin) } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par } */
lêch dòng nh` quá, tâp đọc các error đi
nhớ edit cái HEALTIME...
PHP:#include <amxmodx> #include <hamsandwich> #include <fun> #include <zombieplague> new bool:g_p_alive[33] new g_max_players new nhp[33] new g_heal #define HEALTIME 1.0 // edit heal time vao` day !!! public plugin_precache() { g_heal=precache_model("sprites/zb3_heal.spr") } public plugin_init(){ register_plugin("AutoRegeneration", "1.0", "Sylwester") RegisterHam(Ham_Spawn, "player", "Player_Spawn", 1) RegisterHam(Ham_Killed, "player", "Player_Killed" ) g_max_players = get_maxplayers() set_task(1.0, "regen", 2152, _, _, "b") RegisterHam(Ham_TakeDamage, "player", "fw_takedamage") } public fw_takedamage(victim, inflictor, attacker, Float:damage, bits) { if (attacker == inflictor) { if (zp_get_user_zombie(attacker)) set_task(HEALTIME, "heal_thing", victim) } } public Player_Spawn(id){ if(!is_user_alive(id)) return g_p_alive[id] = true } public Player_Killed(id){ g_p_alive[id] = false } public client_disconnect(id){ g_p_alive[id] = false } public regen(){ new victim victim = read_data(2) static id, hp for(id=1; id<=g_max_players; id++){ if(!g_p_alive[id]) continue nhp[id] = zp_get_zombie_maxhealth(id); hp = get_user_health(id) if(hp >= nhp[id]) { set_user_health(id, hp+100) set_task(0.001, "fire", victim) } } } fire_zombie(origin[3]) { message_begin(MSG_BROADCAST,SVC_TEMPENTITY) write_byte(TE_SPRITE) write_coord(origin[0]) write_coord(origin[1]) write_coord(origin[2]+=30) write_short(g_heal) write_byte(8) write_byte(255) message_end() } public fire(victim) { new origin[3] get_user_origin(victim,origin) fire_zombie(origin) } /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par } */
thì thêm cái check zombie if(zp_get_user_zombie(id)) ...nó hồi máu cho cả Human +-+ hic hic
hả tên kakaan96#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <fun>
#include <zombieplague>
#define PLUGIN "ZombiePlague: Evolution"
#define VERSION "1.0"
#define AUTHOR "Sophia - Dias"
new g_point_zombie[33] // Biến để lưu trữ point cho 32 player + 1 sv là 33
new g_SyncHud
new evolved[33] = 0 // Biến này là biến Evolution nếu là 1 thì tức là user đã evolution, nếu là 0 thì là zombie thường. Thực ra thì không có cái biến này. nhưng để dễ xác định User evolution và user not evolution thì dias tạo switch này cho dễ xác định
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_SyncHud = CreateHudSyncObj()
register_logevent("event_round_end", 2, "1=Round_End")
}
public client_putinserver(id)
{
set_task(0.1, "task_show_evolution", id, _, _, "b") // Hiển thị evolution Point
}
public task_show_evolution(id)
{
if(is_user_alive(id) && zp_get_user_zombie(id))
{
if(evolved[id] == 1) // Nếu User là zombie và đã tiến hóa thì
{
set_hudmessage(255,0,0, 0.015, 0.68, _, 0.2, 0.2)
ShowSyncHudMsg(id, g_SyncHud, "Evolution Point: 1000 / 1000 Point^nEvolution Status: Evolved") // Hud Đã tiến hóa
} else {
set_hudmessage(0,100,0, 0.1, 0.68, _, 0.2, 0.2)
ShowSyncHudMsg(id, g_SyncHud, "Evolution Point: %i / 1000 Point^nEvolution Status: Not Evolved", g_point_zombie[id]) // Hud Chưa tiến hóa
}
}
}
public zp_user_infected_post(victim, infector)
{
g_point_zombie[victim] = 0 // trả point của victim về 0
evolved[victim] = 0 // Victim mới bị nhiễm thì làm gì dc Tiến hóa phải ko ^^
if (is_user_alive(infector) && zp_get_user_zombie(infector))
{
g_point_zombie[infector]+= 200 // +200 Point Khi Infect 1 ai đó
evolution(infector) // Tiến hóa(chưa hết đâu. trong phần tiến hóa con có check point nữa cơ :). ko phải tiến hóa ngay đâu)
}
}
public zp_user_humanized_post(id)
{
// Trả point về 0 và tắt sự tiến hóa khi làm Human
g_point_zombie[id] = 0
evolved[id] = 0
}
public evolution(id)
{
if(is_user_alive(id) && zp_get_user_zombie(id) && g_point_zombie[id] >= 1000) // Đây là phần check point để tiến hóa. 1000 là point yêu cầu để tiến hóa. vậy là 1 lần infect là 200 point => infect 5 lần là Tiến lên -> Evol :))
{
evolved[id] = 1
set_hudmessage(255, 40, 40, -1.0, -1.0, 1, 0.0, 10.0, 0.01, 0.2, -1)
show_hudmessage(id, "You Are Evolved") // Hiển thị hud khi tiến hóa
// Muốn Zombie sau khi tiến hóa thê nào thì thêm code vào đây
}
else
{
set_hudmessage(255, 40, 40, -1.0, -1.0, 0, 0.0, 3.0, 0.01, 0.01, -1)
show_hudmessage(id, "[Evolution] +200 Point") // Hiển thị hud khi infect 1 ai đó và nhận 200 Point
}
}
public event_round_end(id)
{
// Trả point về 0, và tắt evolution Khi ván kết thúc
g_point_zombie[id] = 0
evolved[id] = 0
}
@huucuong_2107198: plugin đây.thay đổi hand bằng cvar nst_wpn_hand nhớ
nếu bị lỗi thì chịu.test ở nhà không bị sao cả