Search the Community

Showing results for tags '...'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Сommunity News
    • News forum
    • Site news
    • Monitoring News
    • Suggestions / Wishes
    • Hosting
  • Counter-Strike Nexon: Zombies
    • General issues
    • Game News
  • Counter-Strike 1.6
    • Creating and configuring the server
    • Global fashion
    • Of mapping
    • Modeling
    • Programming
    • Server Promotion
    • Security
    • General issues
    • Customer additions
  • Counter-Strike: Global Offensive
    • Global fashion
    • Articles
    • Questions about the game
  • Internet Market
    • Sale
    • Purchase
    • Provision of services
  • Alcove
    • Smoking area
  • Разное
    • Testing

Blogs

  • 10

Found 2 results

  1. Всем ку Короче установил lvl system на сервере и всё нормально работает но если пройти последний уровень то пропадет худ просто я добавил часть new const MAX_LEVELS в зомби мод и в худ уже добавил g_iLevel[ID_SHOWHUD], g_iExp[ID_SHOWHUD], (MAX_LEVELS[g_iLevel[ID_SHOWHUD]] Как решить проблему просто жалуются что у них пропадет информация о себе буду очень благодарен #include <amxmodx> #include <nvault> #include <fakemeta> #include <zp_level_sys> #define MAX_CLIENTS 32 #define ID_SHOWHUD (taskid - TASK_SHOWHUD) enum (+= 100) { TASK_SHOWHUD = 10 } new const MAX_LEVELS[45] = { 0, // 1 10, // 2 20, // 3 30, // 4 40, // 5 50, // 6 60, // 7 70, // 8 80, // 9 90, // 10 100, // 11 120, // 12 140, // 13 160, // 14 180, // 15 200, // 16 230, // 17 260, // 18 290, // 19 300, // 20 340, // 21 380, // 22 400, // 23 450, // 24 500, // 25 560, // 26 600, // 27 670, // 28 700, // 29 780, // 30 800, // 31 890, // 32 900, // 33 1000, // 34 2000, // 35 3000, // 36 4000, // 37 5000, // 38 6000, // 39 7000, // 40 8000, // 41 9000, // 42 10000, // 43 15000, // 44 20000 // 45 } const Float:HUD_STATS_X = 0.02; const Float:HUD_STATS_Y = 0.9025; const Float:HUD_SPECT_X = -1.0; const Float:HUD_SPECT_Y = 0.8; const PEV_SPEC_TARGET = pev_iuser2 new g_iLevel[MAX_CLIENTS + 1], g_iExp[ MAX_CLIENTS + 1], g_playername[MAX_CLIENTS + 1][MAX_CLIENTS]; new g_vault public plugin_init() { register_plugin(NAME, VERSION, AUTHOR); register_event("DeathMsg", "EV_DeathMsg", "a"); g_vault = nvault_open("sergiu_rs_level") } public plugin_natives() { register_native("zp_get_user_level", "native_get_user_level", 1) register_native("zp_set_user_level", "native_set_user_level", 1) register_native("zp_get_user_exp", "native_get_user_exp", 1) register_native("zp_set_user_exp", "native_set_user_exp", 1) } public client_disconnect(id) { SaveData(id); } public client_putinserver(iPlayer) { get_user_name(iPlayer, g_playername[iPlayer], charsmax(g_playername[])) LoadData(iPlayer); if(zp_get_user_level(iPlayer) == 0) { zp_set_user_level(iPlayer, 1) } set_task(1.0, "ShowHUD", iPlayer+TASK_SHOWHUD, _, _, "b") } public plugin_end() { nvault_close(g_vault) } public EV_DeathMsg() { static iVictim, iKiller; iVictim = read_data(2); iKiller = read_data(1); if(!is_user_connected(iVictim)) return; if(iKiller == iVictim || !iKiller) return; g_iExp[iKiller] += 1; while(g_iExp[iKiller] >= MAX_LEVELS[g_iLevel[iKiller]]) { g_iLevel[iKiller] += 1; } } public ShowHUD(taskid) { static iPlayer iPlayer = ID_SHOWHUD; if(!is_user_alive(iPlayer)) { iPlayer = pev(iPlayer, PEV_SPEC_TARGET) if(!is_user_alive(iPlayer)) return; } if(iPlayer != ID_SHOWHUD) { set_hudmessage(255, 255, 0, 0.02, 0.20, 0, 0.01, 0.01, 1.0, 1.0, -1); show_hudmessage(ID_SHOWHUD, "[LVL: %d / 45]^n[EXP: %d / %d]", g_iLevel[ID_SHOWHUD], g_iExp[ID_SHOWHUD], (MAX_LEVELS[g_iLevel[ID_SHOWHUD]])); } else { set_hudmessage(255, 255, 0, 0.02, 0.20, 0, 0.01, 0.01, 1.0, 1.0, -1); show_hudmessage(ID_SHOWHUD, "[LVL: %d / 45]^n[EXP: %d / %d]", g_iLevel[ID_SHOWHUD], g_iExp[ID_SHOWHUD], (MAX_LEVELS[g_iLevel[ID_SHOWHUD]])); } } public SaveData(id) { new AuthID[35] get_user_authid(id,AuthID,34) new vaultkey[64], vaultdata[256] format(vaultkey, 63, "%s-cso", AuthID) format(vaultdata, 255, "%i#%i#", g_iLevel[id], g_iExp[id]) nvault_set(g_vault, vaultkey, vaultdata) return PLUGIN_CONTINUE } public LoadData(id) { new AuthID[35] get_user_authid(id, AuthID, 34) new vaultkey[64], vaultdata[256] format(vaultkey, 63, "%s-cso", AuthID) format(vaultdata, 255, "%i#%i#", g_iLevel[id], g_iExp[id]) nvault_get(g_vault, vaultkey, vaultdata, 255) replace_all(vaultdata, 255, "#", " ") new experience[32], playerlevel[32] parse(vaultdata, experience, 31, playerlevel, 31) g_iLevel[id] = str_to_num(experience) g_iExp[id] = str_to_num(playerlevel) return PLUGIN_CONTINUE } public native_get_user_exp(id) { return g_iExp[id]; } public native_set_user_exp(id, amount) { g_iExp[id] = amount; } public native_get_user_level(id) { return g_iLevel[id]; } public native_set_user_level(id, amount) { g_iLevel[id] = amount; }
  2. #include <amxmodx> #include <fakemeta> #include <engine> #include <hamsandwich> #include <mgs_main_plugins> #include <fun> #define NAME "mgs_zombie_class_big" #define VERSION "1.0" #define AUTHOR "pRoxx" #define TASK 111 #define TASK_TRAP 500 new const zombie_class_name[] = "Строитель" new const zombie_class_info[] = "\y[Много жизней и ловушки на R]" new const zombie_class_model[] = "mgs1_big_zombie" new const zombie_class_claw_model[] = "mgs1/v_big_zombie.mdl" new const g_trap_sound[] = "zombie_plague/mgs1/trap.wav" const zombie_class_health = 7000 const zombie_class_speed = 254 const Float:zombie_class_gravity = 0.9 const Float:zombie_class_knockback = 1.0 new bool: g_Traped[33] new g_Trap, iEnt[33] new Float:g_last_use[33] new CVAR_INTRAPTIME, CVAR_MAXTRAPS, CVAR_TRAPDELAY new Traps[33] new g_zclass_doom public plugin_init() { register_plugin(NAME, VERSION, AUTHOR) register_forward(FM_PlayerPreThink, "fw_PreThink" ) register_touch("trap", "player", "Touch") register_impulse(100, "UseSkill") register_event("CurWeapon", "CurentWeapon", "be") register_logevent("RoundStart", 2, "0=World triggered", "1=Round_Start") CVAR_INTRAPTIME = register_cvar("intrap_time", "3") CVAR_MAXTRAPS = register_cvar("max_traps", "3") CVAR_TRAPDELAY = register_cvar("trapdelay", "3") RegisterHam(Ham_Spawn, "player", "Spawn", 1) RegisterHam(Ham_TakeDamage, "player", "TakeDamage") } public plugin_precache() { g_zclass_doom = zp_register_zombie_class(zombie_class_name, zombie_class_info, zombie_class_model, zombie_class_claw_model, zombie_class_health, zombie_class_speed, zombie_class_gravity, zombie_class_knockback) g_Trap = precache_model( "sprites/zombie_plague/mgs1/trap.spr") precache_sound(g_trap_sound[0]) } public zp_user_infected_post(id, infector) { if(zp_get_user_zombie_class(id) == g_zclass_doom && !zp_get_user_nemesis(id)) { Traps[id] = 0 } if(g_Traped[id]) { g_Traped[id] = false } } public TakeDamage(idV, inf, idA, Float:damage, damage_type) { if(g_Traped[idV] && !zp_get_user_zombie(idV) && (damage_type & DMG_FALL)) { return HAM_SUPERCEDE } return HAM_IGNORED } public RoundStart() { set_task(1.0, "kill_traps") } public UseSkill(id) { if(!zp_get_user_zombie(id) || zp_get_user_nemesis(id)) return PLUGIN_CONTINUE new Float:the_time the_time = get_gametime() new Flags = fm_get_ent_flags(id) if(zp_get_user_zombie_class(id) == g_zclass_doom && (Flags & FL_ONGROUND)) { if(g_last_use[id] + get_pcvar_float(CVAR_TRAPDELAY) <= the_time) { if(Traps[id] < get_pcvar_num(CVAR_MAXTRAPS)) { create_trap(id) g_last_use[id] = the_time Traps[id] ++ } else { color_chat(id, "!g[MGS] !yВаши ловушки закончились") } } else { color_chat(id, "!g[MGS] !yНадо ждать 3 секунды перед тем как установить новую ловушку") } } return PLUGIN_CONTINUE } public kill_traps() { new iEnt = fm_find_ent_by_class(-1, "trap") while(iEnt > 0) { remove_entity(iEnt) remove_task(iEnt + TASK_TRAP) iEnt = find_ent_by_class(-1, "trap") } } public CurentWeapon(id) { if(g_Traped[id]) { set_pev(id, pev_maxspeed, 1.0) } else { set_pev(id, pev_maxspeed, 1.0) } } public client_connect(id) { g_Traped[id] = false } public client_disconnect(id) { g_Traped[id] = false } public Spawn(id) { g_Traped[id] = false } public fw_PreThink(id) { if(g_Traped[id] && is_user_alive(id) && !zp_get_user_zombie(id)) { set_pev(id, pev_maxspeed, 1.0) } return FMRES_IGNORED } public create_trap(id) { new Float:origin[3] entity_get_vector(id, EV_VEC_origin, origin) iEnt[id] = create_entity("info_target") if(is_valid_ent(iEnt[id])) { entity_set_origin(iEnt[id], origin) entity_set_string(iEnt[id], EV_SZ_classname, "trap") entity_set_size(iEnt[id], Float:{-80.0,-80.0,-80.0},Float:{80.0,80.0,80.0}) entity_set_int(iEnt[id], EV_INT_solid, 1) entity_set_model(iEnt[id], "") new param[1] param[0] = iEnt[id] set_task(0.1, "sprite", iEnt[id] + TASK_TRAP, param, 1, "b") } } public sprite(param[1]) { new iEnt = param[0] new Float:originEnt[3] entity_get_vector(iEnt, EV_VEC_origin, originEnt) for(new i = 0; i <= get_maxplayers(); i++) { if(zp_get_user_zombie(i)) { message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, i) write_byte(TE_SPRITE) write_coord(floatround(originEnt[0])) write_coord(floatround(originEnt[1])) write_coord(floatround(originEnt[2])) write_short(g_Trap) write_byte(8) write_byte(200) message_end() } } return PLUGIN_CONTINUE } public Touch(tr, id) { if(is_user_alive(id) && !zp_get_user_zombie(id)) { g_Traped[id] = true color_chat(id, "!g[MGS] !yВы попали в ловушку зомбаря") emit_sound(id, CHAN_WEAPON, g_trap_sound[0], 1.0, ATTN_NORM, 0, PITCH_LOW) set_task(get_pcvar_float(CVAR_INTRAPTIME), "remove_trap", id + TASK) remove_entity(tr) remove_task(tr + TASK_TRAP) set_pev(id, pev_gravity, 999999.9) } } public remove_trap(taskid) { new id = taskid - TASK g_Traped[id] = false color_chat(id, "!g[MGS] !yЛовушка закончилась") } stock fm_find_ent_by_class(index, const classname[]) { return engfunc(EngFunc_FindEntityByString, index, "classname", classname) } stock fm_get_ent_flags(index) { return pev(index, pev_flags) } stock color_chat(const id, const input[], any:...) { new count = 1, players[32]; static msg[191]; vformat(msg, 190, input, 3); replace_all(msg, 190, "!g", "^4"); replace_all(msg, 190, "!y", "^1"); replace_all(msg, 190, "!t", "^3"); if(id)players[0] = id; else get_players(players, count, "ch"); { for(new i = 0; i < count; i++) { if(is_user_connected(players)) { message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players); write_byte(players); write_string(msg); message_end(); } } } } короче когда я попадаю в ловушку то она работает только для оружии и гранат а для ножей нет то есть я ставлю ловушку заражаю себя потом попадаю в ловушку и меня блочит потом быстро меняю на нож и я снова могу ходить хотя в чате не пишет что ловушка закончилась как исправить