egor_haker | Дата: Среда, 15.07.2009, 16:57:20 | Сообщение # 1 |
Майор
Группа: Пользователи
Сообщений: 99
Статус: Не в сети
| нужен плагин для biohazard который позволяет воскресить zombie после смерти несколько раз( то есть чтоб они имели несколько жизней) чтоб пополнить надо убить людей как в zombie panic. У меня с скриптингом не очень, только месяц опыта, да и то плохо выходит. Вот один из них spawn зомби после смерти и spawn дюдей после смерти за зомби только spawn не имеет ограничения. Вот код Code #include <amxmodx> #include <biohazard> #include <fakemeta_util> #include <hamsandwich> #include <cstrike> #define MSG_CANTJOIN "You must be dead!" #define MSG_GAMENOTSTARTED "The game has not started!" #define MSG_NOPLACE "There are too many zombies on the server!" #define MSG_ABUSE "You can not spawn now!" #define MSG_ANNONCE "+zlive to spawn as Zombie!" #define MSG_CHOOSETEAM "You must choose a team before spawning!" #define OFFSET_TEAM 114
new SayText, cvar_zlive new g_firstime[33]
new cvar_zlivemode
public plugin_init() { register_plugin("bio_zlive","1.0","bipbip") is_biomod_active() ? plugin_init2() : pause("ad") }
public plugin_init2() { cvar_zlive = register_cvar("bh_zlive", "1")
cvar_zlivemode = register_cvar("bh_zlivemode","1")
}
public client_connect(id) g_firstime[id] = 1; public client_disconnect(id) g_firstime[id] = 1;
public client_putinserver(id) { set_task(1.0,"task_putinserver",id)
} public cheese_killed(id) { if (get_pcvar_num(cvar_zlivemode) == 1 && g_firstime[id]==0) { set_task(1.0,"task_respawn", id + 994) g_firstime[id] = 1 } } public task_putinserver(id) { if (is_user_connected(id)) { g_firstime[id] = 1 RegisterHamFromEntity(Ham_Spawn, id, "cheese_spawn_post", 1) RegisterHamFromEntity(Ham_Killed, id, "cheese_killed",1) set_task(5.0,"task_annonce",id) } } public cheese_spawn_post(id) g_firstime[id] = 0; public task_annonce(id) if (get_pcvar_num(cvar_zlive)) { if (g_firstime[id] == 1 ) { static CsTeams: team team = cs_get_user_team(id) if (team != CS_TEAM_SPECTATOR && team != CS_TEAM_UNASSIGNED) if (is_game_started() && !is_user_alive(id)) green_print(id, MSG_ANNONCE) set_task(10.0,"task_annonce",id) } } public task_respawn(tid) { new id = tid - 994 if (canjoin(id)) { g_firstime[id]++ ExecuteHam(Ham_CS_RoundRespawn, id) infect_user(id) set_task(1.0,"task_infect",id) } } public task_infect(id) { cs_set_user_team2(id,CS_TEAM_T,1) client_cmd(id,"slot10") }
bool: canjoin(id) { if (is_user_alive(id)) { green_print(id, MSG_CANTJOIN) return false } static CsTeams: team team = cs_get_user_team(id)
if (team == CS_TEAM_SPECTATOR || team == CS_TEAM_UNASSIGNED) { green_print(id, MSG_CHOOSETEAM) return false }
if (!is_game_started()) { green_print(id, MSG_GAMENOTSTARTED) return false } if (g_firstime[id]==5) { green_print(id, MSG_ABUSE) return false } return true; } stock cs_set_user_team2(index, {CsTeams,_}:team, update = 1) { set_pdata_int(index, OFFSET_TEAM, _:team) set_pev(index, pev_team, _:team)
if(update) { static _msg_teaminfo; if(!_msg_teaminfo) _msg_teaminfo = get_user_msgid("TeamInfo") static teaminfo[][] = { "UNASSIGNED", "TERRORIST", "CT", "SPECTATOR" }
message_begin(MSG_ALL, _msg_teaminfo) write_byte(index) write_string(teaminfo[_:team]) message_end() } return 1 } stock green_print(index, const message[]) { new finalmsg[192]; formatex(finalmsg, 191, "^x04[BIO] ^x01%s", message); message_begin(MSG_ONE, SayText, _, index); write_byte(index); write_string(finalmsg); message_end(); }
мой сайт http://cs-mapping.ucoz.net
|
|
| |