Drag Bugado Hitskin_logo Hitskin.com

Isto é uma pré-visualização de um tema em Hitskin.com
Instalar o temaVoltar para a ficha do tema

Zplague

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Seu portal de Zombie Plague no Brasil

Zumbis Online

Últimos assuntos

» [ANÚNCIO] Alguem vivo ai?
por Eclipse 17/9/2024, 6:39 pm

» The Fen1xS CLan | Zombie Plague | [XP/LEVELS] #2024
por hevy 5/7/2024, 8:28 pm

»
por Eclipse 29/2/2024, 12:30 am

» [Plugin] /vm Com Status
por Isr7 4/6/2023, 3:24 pm

» Alguém pra manter um servidor comigo?
por Isr7 3/6/2023, 4:52 pm

» Alguém querendo criar um servidor de zp? eu pago a host quem quiser deixar o discord ai Isr7#6920
por Isr7 3/6/2023, 3:18 pm

» PEDIDO: Multijump pros VIP
por Madness 15/3/2023, 3:44 pm

» [ZP] Modo padre para 5.0
por XperitosEspetinho123 15/7/2022, 3:31 pm

» [KZ] Servidores de cs 1.6
por [Dk]Serial-Killer 7/5/2022, 4:12 am

» [PLUGIN BY SKVD & WILLIAN] SHOP DE FANTASIAS
por dushowW 23/7/2020, 5:44 pm

Os membros mais ativos da semana

Nenhum usuário

Frases filosóficas Zplague:

....

Google Adsense

Estatísticas

Os nossos membros postaram um total de 38140 mensagens em 6680 assuntos

Temos 2796 usuários registrados

O último membro registrado é zmplugins - Henrique


2 participantes

    Drag Bugado

    [Gp'Ex] | Vampiro
    [Gp'Ex] | Vampiro
    Parceiros


    Número de Mensagens : 155
    Ammo Packs : 4799
    Honra : 15
    Data de inscrição : 23/01/2012

    Drag Bugado Empty Drag Bugado

    Mensagem por [Gp'Ex] | Vampiro 2/2/2012, 10:57 pm

    Gente Meu drag zm funcionava normal de uma Hora pra outra ele Bugo e agora aparece pros 2 times,

    Ja arrumei la no itensextra.ini mais mesmo assim ainda aparece pra humanos,

    Alguem sabe oq pode tar dando problemas? Se alguem tiver a sma dele Poderia me mandar?

    Luankc
    Luankc
    Administrador


    Masculino Número de Mensagens : 3340
    Ammo Packs : 7212
    Honra : 143
    Data de inscrição : 21/02/2011

    Drag Bugado Empty Re: Drag Bugado

    Mensagem por Luankc 3/2/2012, 12:46 pm

    Não conheço esse item aí cara, mais dei uma pesquisada e achei um item extra com esse nome...
    Da uma olhada e vê se é isso que você procura:

    #include < amxmodx >
    #include < zombieplague >
    #include < fakemeta >
    #include < hamsandwich >
    #include < engine >

    #define PLUGIN "[ZP] Extra Drag"
    #define VERSION "1.1"
    #define AUTHOR "4eRT"

    //Some vars
    new const g_extra_drag[] = { "Drag ability" }
    new const g_vmodel[] = { "models/barnacle/v_bgrap.mdl" }
    new const g_pmodel[] = { "models/barnacle/p_bgrap.mdl" }
    new g_sndMiss[] = "zombie_plague/Smoker_TongueHit_miss.wav"
    new g_sndDrag[] = "zombie_plague/Smoker_TongueHit_drag.wav"
    new g_hooked[33], g_hooksLeft[33], g_unable2move[33], g_over_dmg[33]
    new Float:g_lastHook[33]
    new g_Line, g_item_drag
    new cvar_enabled, cvar_cost, cvar_maxdrags, cvar_dragspeed, cvar_cooldown, cvar_dmgtostop, cvar_mates, cvar_extrahook, cvar_unb2move, cvar_nemesis, cvar_survivor, cvar_reset
    new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
    new bool: g_has_drag[33], bool: g_bind_use[33], bool: g_bind_or_not[33], bool: g_drag_i[33]

    public plugin_init()
    {
    cvar_enabled = register_cvar("zp_extra_drag", "1")
    cvar_cost = register_cvar("zp_extra_drag_cost", "10")
    cvar_dragspeed = register_cvar("zp_extra_drag_dragspeed", "160")
    cvar_maxdrags = register_cvar("zp_extra_drag_maxdrags", "10")
    cvar_cooldown = register_cvar("zp_extra_drag_cooldown", "5")
    cvar_dmgtostop = register_cvar("zp_extra_drag_dmg2stop", "300")
    cvar_mates = register_cvar("zp_extra_drag_mates", "0")
    cvar_extrahook = register_cvar("zp_extra_drag_extrahook", "2")
    cvar_unb2move = register_cvar("zp_extra_drag_unable_move", "1")
    cvar_nemesis = register_cvar("zp_extra_drag_nemesis", "0")
    cvar_survivor = register_cvar("zp_extra_drag_survivor", "1")
    cvar_reset = register_cvar("zp_extra_drag_reset", "0")
    register_event("HLTV", "newSpawn", "a", "1=0", "2=0")
    register_event("DeathMsg", "player_death", "a")
    register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
    register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_clcmd("+drag","drag_start", ADMIN_USER, "bind ^"key^" ^"+drag^"")
    register_clcmd("-drag","drag_end")
    register_menucmd(register_menuid("Do you want to bind V +drag?"), keys, "bind_v_key")
    g_item_drag = zp_register_extra_item(g_extra_drag, get_pcvar_num(cvar_cost), ZP_TEAM_ZOMBIE)
    }

    public plugin_precache()
    {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    precache_sound(g_sndDrag)
    precache_sound(g_sndMiss)
    g_Line = precache_model("sprites/zbeam4.spr")
    engfunc(EngFunc_PrecacheModel, g_vmodel)
    engfunc(EngFunc_PrecacheModel, g_pmodel)
    }

    public message_cur_weapon(msg_id, msg_dest, msg_entity)
    replace_models(msg_entity);

    public replace_models(id)
    {
    if (!is_user_alive(id) || !zp_get_user_zombie(id))
    return;

    if(get_user_weapon(id) == CSW_KNIFE && g_has_drag[id])
    {
    set_pev(id, pev_viewmodel2, g_vmodel);
    set_pev(id, pev_weaponmodel2, g_pmodel);
    }
    }

    public zp_extra_item_selected(id, item)
    {
    if (item == g_item_drag)
    {
    if(is_user_alive(id) && get_pcvar_num(cvar_enabled) == 1)
    {
    g_hooksLeft[id] = get_pcvar_num(cvar_maxdrags)
    g_has_drag[id] = true
    client_print(id, print_chat, "You've bought drag ability. Now have fun with barnacle hand!")
    replace_models(id)

    if (!g_bind_or_not[id])
    {
    new menu[192]
    format(menu, 191, "Do you want to bind V +drag?^n^n1. Yes^n2. No^n3. Drag on +USE")
    show_menu(id, keys, menu)
    }
    } else
    return
    }
    }

    public zp_user_infected_post(id, infector)
    if(g_has_drag[infector])
    g_hooksLeft[infector] = g_hooksLeft[infector] + get_pcvar_num(cvar_extrahook)

    public zp_user_humanized_post(id)
    if(get_pcvar_num(cvar_reset) == 1)
    g_has_drag[id] = false

    public newSpawn()
    {
    for (new id = 1; id <= 32; id++)
    {
    if (g_hooked[id])
    drag_end(id)

    g_has_drag[id] = false
    }
    }

    public player_death()
    {
    new attacker = read_data(1)
    new id = read_data(2)

    if (g_hooked[attacker])
    drag_end(id)

    g_has_drag[id] = false
    }

    public client_connect(id)
    g_has_drag[id] = false

    public client_disconnect(id)
    {
    if (g_hooked[id])
    drag_end(id)

    if(g_unable2move[id])
    g_unable2move[id] = false

    g_has_drag[id] = false
    }

    public drag_start(id)
    {
    if (zp_get_user_zombie(id) && g_has_drag[id] && !g_drag_i[id]) {

    static Float:cdown
    cdown = get_pcvar_float(cvar_cooldown)

    if (!is_user_alive(id)) {
    client_print(id, print_chat, "[ZP] You can't drag if you are dead!")
    return PLUGIN_HANDLED
    }

    if (g_hooksLeft[id] <= 0) {
    client_print(id, print_chat, "[ZP] You can't drag anymore!")
    return PLUGIN_HANDLED
    }

    if (get_gametime() - g_lastHook[id] < cdown) {
    client_print(id, print_chat, "[ZP] Wait %.f0 sec. to drag again!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_lastHook[id]))
    return PLUGIN_HANDLED
    }

    if (zp_is_nemesis_round() && get_pcvar_num(cvar_nemesis) == 0) {
    client_print(id, print_chat, "[ZP] You can't drag in Nemesis mode!")
    return PLUGIN_HANDLED
    }

    new hooktarget, body
    get_user_aiming(id, hooktarget, body)

    if (is_user_alive(hooktarget)) {
    if (!zp_get_user_zombie(hooktarget))
    {
    if (zp_get_user_survivor(hooktarget) && get_pcvar_num(cvar_survivor) == 0) {
    client_print(id, print_chat, "[ZP] You can't drag Survivor!")
    return PLUGIN_HANDLED
    }

    g_hooked[id] = hooktarget
    emit_sound(hooktarget, CHAN_BODY, g_sndDrag, 1.0, ATTN_NORM, 0, PITCH_HIGH)
    }
    else
    {
    if (get_pcvar_num(cvar_mates) == 1)
    {
    g_hooked[id] = hooktarget
    emit_sound(hooktarget, CHAN_BODY, g_sndDrag, 1.0, ATTN_NORM, 0, PITCH_HIGH)
    }
    else
    {
    client_print(id, print_chat, "[ZP] You can't drag teammates!")
    return PLUGIN_HANDLED
    }
    }

    if (get_pcvar_float(cvar_dragspeed) <= 0.0)
    cvar_dragspeed = 1

    new parm[2]
    parm[0] = id
    parm[1] = hooktarget

    set_task(0.1, "reelin_player", id, parm, 2, "b")
    harpoon_target(parm)

    g_hooksLeft[id]--
    client_print(id, print_chat, "[ZP] You can drag player to youself %d time%s", g_hooksLeft[id], (g_hooksLeft[id] < 2) ? "" : "s")
    g_drag_i[id] = true

    if(get_pcvar_num(cvar_unb2move) == 1)
    g_unable2move[hooktarget] = true

    if(get_pcvar_num(cvar_unb2move) == 2)
    g_unable2move[id] = true

    if(get_pcvar_num(cvar_unb2move) == 3)
    {
    g_unable2move[hooktarget] = true
    g_unable2move[id] = true
    }
    } else {
    g_hooked[id] = 33
    noTarget(id)
    emit_sound(hooktarget, CHAN_BODY, g_sndMiss, 1.0, ATTN_NORM, 0, PITCH_HIGH)
    g_drag_i[id] = true
    g_hooksLeft[id]--
    client_print(id, print_chat, "[ZP] You can drag player to youself %d time%s", g_hooksLeft[id], (g_hooksLeft[id] < 2) ? "" : "s")
    }
    }
    else
    return PLUGIN_HANDLED

    return PLUGIN_CONTINUE
    }

    public reelin_player(parm[])
    {
    new id = parm[0]
    new victim = parm[1]

    if (!g_hooked[id] || !is_user_alive(victim))
    {
    drag_end(id)
    return
    }

    new Float:fl_Velocity[3]
    new idOrigin[3], vicOrigin[3]

    get_user_origin(victim, vicOrigin)
    get_user_origin(id, idOrigin)

    new distance = get_distance(idOrigin, vicOrigin)

    if (distance > 1) {
    new Float:fl_Time = distance / get_pcvar_float(cvar_dragspeed)

    fl_Velocity[0] = (idOrigin[0] - vicOrigin[0]) / fl_Time
    fl_Velocity[1] = (idOrigin[1] - vicOrigin[1]) / fl_Time
    fl_Velocity[2] = (idOrigin[2] - vicOrigin[2]) / fl_Time
    } else {
    fl_Velocity[0] = 0.0
    fl_Velocity[1] = 0.0
    fl_Velocity[2] = 0.0
    }

    entity_set_vector(victim, EV_VEC_velocity, fl_Velocity)
    }

    public drag_end(id)
    {
    g_hooked[id] = 0
    beam_remove(id)
    remove_task(id)

    if (g_drag_i[id])
    g_lastHook[id] = get_gametime()

    g_drag_i[id] = false
    g_unable2move[id] = false
    }

    public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
    {
    if (is_user_alive(attacker) && (get_pcvar_num(cvar_dmgtostop) > 0))
    {
    g_over_dmg[victim] = g_over_dmg[victim] + floatround(damage)
    if (g_over_dmg[victim] >= get_pcvar_num(cvar_dmgtostop))
    {
    g_over_dmg[victim] = 0
    drag_end(victim)
    return HAM_IGNORED;
    }
    }

    return HAM_IGNORED;
    }

    public fw_PlayerPreThink(id)
    {
    if (!is_user_alive(id))
    return FMRES_IGNORED

    new button = get_user_button(id)
    new oldbutton = get_user_oldbutton(id)

    if (zp_get_user_zombie(id) && g_has_drag[id])
    {
    if(g_bind_use[id])
    {
    if (!(oldbutton & IN_USE) && (button & IN_USE))
    drag_start(id)

    if ((oldbutton & IN_USE) && !(button & IN_USE))
    drag_end(id)
    }
    }

    if (!g_drag_i[id])
    g_unable2move[id] = false

    if (g_unable2move[id] && get_pcvar_num(cvar_unb2move) > 0)
    set_pev(id, pev_maxspeed, 1.0)

    return PLUGIN_CONTINUE
    }

    public harpoon_target(parm[])
    {
    new id = parm[0]
    new hooktarget = parm[1]

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(8)
    write_short(id)
    write_short(hooktarget)
    write_short(g_Line)
    write_byte(0)
    write_byte(0)
    write_byte(200)
    write_byte(8)
    write_byte(1)
    write_byte(255)
    write_byte(0)
    write_byte(0)
    write_byte(90)
    write_byte(10)
    message_end()
    }

    public bind_v_key(id, keys)
    {
    g_bind_or_not[id] = true
    switch(keys)
    {
    case 0:
    client_cmd(id, "bind v ^"+drag^"")

    case 1:
    client_print(id, print_chat, "[ZP] To drag player to youself (bind ^'^'key^'^' ^'^'+drag^'^') hold binded key")

    case 2:
    g_bind_use[id] = true

    default:
    g_bind_or_not[id] = false
    }

    return PLUGIN_HANDLED
    }

    public noTarget(id)
    {
    new endorigin[3]

    get_user_origin(id, endorigin, 3)

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte( TE_BEAMENTPOINT );
    write_short(id)
    write_coord(endorigin[0])
    write_coord(endorigin[1])
    write_coord(endorigin[2])
    write_short(g_Line)
    write_byte(0)
    write_byte(0)
    write_byte(200)
    write_byte(8)
    write_byte(1)
    write_byte(255)
    write_byte(0)
    write_byte(0)
    write_byte(75)
    write_byte(0)
    message_end()
    }

    public beam_remove(id)
    {
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(99)
    write_short(id)
    message_end()
    }


    Última edição por Luankc em 13/2/2012, 4:22 pm, editado 1 vez(es)
    [Gp'Ex] | Vampiro
    [Gp'Ex] | Vampiro
    Parceiros


    Número de Mensagens : 155
    Ammo Packs : 4799
    Honra : 15
    Data de inscrição : 23/01/2012

    Drag Bugado Empty Re: Drag Bugado

    Mensagem por [Gp'Ex] | Vampiro 3/2/2012, 5:38 pm

    Luankc escreveu:Não conheço esse item aí cara, mais dei uma pesquisada e achei um item extra com esse nome...
    Da uma olhada e vê se é isso que você procura:

    #include < amxmodx >
    #include < zombieplague >
    #include < fakemeta >
    #include < hamsandwich >
    #include < engine >

    #define PLUGIN "[ZP] Extra Drag"
    #define VERSION "1.1"
    #define AUTHOR "4eRT"

    //Some vars
    new const g_extra_drag[] = { "Drag ability" }
    new const g_vmodel[] = { "models/barnacle/v_bgrap.mdl" }
    new const g_pmodel[] = { "models/barnacle/p_bgrap.mdl" }
    new g_sndMiss[] = "zombie_plague/Smoker_TongueHit_miss.wav"
    new g_sndDrag[] = "zombie_plague/Smoker_TongueHit_drag.wav"
    new g_hooked[33], g_hooksLeft[33], g_unable2move[33], g_over_dmg[33]
    new Float:g_lastHook[33]
    new g_Line, g_item_drag
    new cvar_enabled, cvar_cost, cvar_maxdrags, cvar_dragspeed, cvar_cooldown, cvar_dmgtostop, cvar_mates, cvar_extrahook, cvar_unb2move, cvar_nemesis, cvar_survivor, cvar_reset
    new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3
    new bool: g_has_drag[33], bool: g_bind_use[33], bool: g_bind_or_not[33], bool: g_drag_i[33]

    public plugin_init()
    {
    cvar_enabled = register_cvar("zp_extra_drag", "1")
    cvar_cost = register_cvar("zp_extra_drag_cost", "10")
    cvar_dragspeed = register_cvar("zp_extra_drag_dragspeed", "160")
    cvar_maxdrags = register_cvar("zp_extra_drag_maxdrags", "10")
    cvar_cooldown = register_cvar("zp_extra_drag_cooldown", "5")
    cvar_dmgtostop = register_cvar("zp_extra_drag_dmg2stop", "300")
    cvar_mates = register_cvar("zp_extra_drag_mates", "0")
    cvar_extrahook = register_cvar("zp_extra_drag_extrahook", "2")
    cvar_unb2move = register_cvar("zp_extra_drag_unable_move", "1")
    cvar_nemesis = register_cvar("zp_extra_drag_nemesis", "0")
    cvar_survivor = register_cvar("zp_extra_drag_survivor", "1")
    cvar_reset = register_cvar("zp_extra_drag_reset", "0")
    register_event("HLTV", "newSpawn", "a", "1=0", "2=0")
    register_event("DeathMsg", "player_death", "a")
    register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
    register_forward(FM_PlayerPreThink, "fw_PlayerPreThink")
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
    register_clcmd("+drag","drag_start", ADMIN_USER, "bind ^"key^" ^"+drag^"")
    register_clcmd("-drag","drag_end")
    register_menucmd(register_menuid("Do you want to bind V +drag?"), keys, "bind_v_key")
    g_item_drag = zp_register_extra_item(g_extra_drag, get_pcvar_num(cvar_cost), ZP_TEAM_ZOMBIE)
    }

    public plugin_precache()
    {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    precache_sound(g_sndDrag)
    precache_sound(g_sndMiss)
    g_Line = precache_model("sprites/zbeam4.spr")
    engfunc(EngFunc_PrecacheModel, g_vmodel)
    engfunc(EngFunc_PrecacheModel, g_pmodel)
    }

    public message_cur_weapon(msg_id, msg_dest, msg_entity)
    replace_models(msg_entity);

    public replace_models(id)
    {
    if (!is_user_alive(id) || !zp_get_user_zombie(id))
    return;

    if(get_user_weapon(id) == CSW_KNIFE && g_has_drag[id])
    {
    set_pev(id, pev_viewmodel2, g_vmodel);
    set_pev(id, pev_weaponmodel2, g_pmodel);
    }
    }

    public zp_extra_item_selected(id, item)
    {
    if (item == g_item_drag)
    {
    if(is_user_alive(id) && get_pcvar_num(cvar_enabled) == 1)
    {
    g_hooksLeft[id] = get_pcvar_num(cvar_maxdrags)
    g_has_drag[id] = true
    client_print(id, print_chat, "You've bought drag ability. Now have fun with barnacle hand!")
    replace_models(id)

    if (!g_bind_or_not[id])
    {
    new menu[192]
    format(menu, 191, "Do you want to bind V +drag?^n^n1. Yes^n2. No^n3. Drag on +USE")
    show_menu(id, keys, menu)
    }
    } else
    return
    }
    }

    public zp_user_infected_post(id, infector)
    if(g_has_drag[infector])
    g_hooksLeft[infector] = g_hooksLeft[infector] + get_pcvar_num(cvar_extrahook)

    public zp_user_humanized_post(id)
    if(get_pcvar_num(cvar_reset) == 1)
    g_has_drag[id] = false

    public newSpawn()
    {
    for (new id = 1; id <= 32; id++)
    {
    if (g_hooked[id])
    drag_end(id)

    g_has_drag[id] = false
    }
    }

    public player_death()
    {
    new attacker = read_data(1)
    new id = read_data(2)

    if (g_hooked[attacker])
    drag_end(id)

    g_has_drag[id] = false
    }

    public client_connect(id)
    g_has_drag[id] = false

    public client_disconnect(id)
    {
    if (g_hooked[id])
    drag_end(id)

    if(g_unable2move[id])
    g_unable2move[id] = false

    g_has_drag[id] = false
    }

    public drag_start(id)
    {
    if (zp_get_user_zombie(id) && g_has_drag[id] && !g_drag_i[id]) {

    static Float:cdown
    cdown = get_pcvar_float(cvar_cooldown)

    if (!is_user_alive(id)) {
    client_print(id, print_chat, "[ZP] You can't drag if you are dead!")
    return PLUGIN_HANDLED
    }

    if (g_hooksLeft[id] <= 0) {
    client_print(id, print_chat, "[ZP] You can't drag anymore!")
    return PLUGIN_HANDLED
    }

    if (get_gametime() - g_lastHook[id] < cdown) {
    client_print(id, print_chat, "[ZP] Wait %.f0 sec. to drag again!", get_pcvar_float(cvar_cooldown) - (get_gametime() - g_lastHook[id]))
    return PLUGIN_HANDLED
    }

    if (zp_is_nemesis_round() && get_pcvar_num(cvar_nemesis) == 0) {
    client_print(id, print_chat, "[ZP] You can't drag in Nemesis mode!")
    return PLUGIN_HANDLED
    }

    new hooktarget, body
    get_user_aiming(id, hooktarget, body)

    if (is_user_alive(hooktarget)) {
    if (!zp_get_user_zombie(hooktarget))
    {
    if (zp_get_user_survivor(hooktarget) && get_pcvar_num(cvar_survivor) == 0) {
    client_print(id, print_chat, "[ZP] You can't drag Survivor!")
    return PLUGIN_HANDLED
    }

    g_hooked[id] = hooktarget
    emit_sound(hooktarget, CHAN_BODY, g_sndDrag, 1.0, ATTN_NORM, 0, PITCH_HIGH)
    }
    else
    {
    if (get_pcvar_num(cvar_mates) == 1)
    {
    g_hooked[id] = hooktarget
    emit_sound(hooktarget, CHAN_BODY, g_sndDrag, 1.0, ATTN_NORM, 0, PITCH_HIGH)
    }
    else
    {
    client_print(id, print_chat, "[ZP] You can't drag teammates!")
    return PLUGIN_HANDLED
    }
    }

    if (get_pcvar_float(cvar_dragspeed) <= 0.0)
    cvar_dragspeed = 1

    new parm[2]
    parm[0] = id
    parm[1] = hooktarget

    set_task(0.1, "reelin_player", id, parm, 2, "b")
    harpoon_target(parm)

    g_hooksLeft[id]--
    client_print(id, print_chat, "[ZP] You can drag player to youself %d time%s", g_hooksLeft[id], (g_hooksLeft[id] < 2) ? "" : "s")
    g_drag_i[id] = true

    if(get_pcvar_num(cvar_unb2move) == 1)
    g_unable2move[hooktarget] = true

    if(get_pcvar_num(cvar_unb2move) == 2)
    g_unable2move[id] = true

    if(get_pcvar_num(cvar_unb2move) == 3)
    {
    g_unable2move[hooktarget] = true
    g_unable2move[id] = true
    }
    } else {
    g_hooked[id] = 33
    noTarget(id)
    emit_sound(hooktarget, CHAN_BODY, g_sndMiss, 1.0, ATTN_NORM, 0, PITCH_HIGH)
    g_drag_i[id] = true
    g_hooksLeft[id]--
    client_print(id, print_chat, "[ZP] You can drag player to youself %d time%s", g_hooksLeft[id], (g_hooksLeft[id] < 2) ? "" : "s")
    }
    }
    else
    return PLUGIN_HANDLED

    return PLUGIN_CONTINUE
    }

    public reelin_player(parm[])
    {
    new id = parm[0]
    new victim = parm[1]

    if (!g_hooked[id] || !is_user_alive(victim))
    {
    drag_end(id)
    return
    }

    new Float:fl_Velocity[3]
    new idOrigin[3], vicOrigin[3]

    get_user_origin(victim, vicOrigin)
    get_user_origin(id, idOrigin)

    new distance = get_distance(idOrigin, vicOrigin)

    if (distance > 1) {
    new Float:fl_Time = distance / get_pcvar_float(cvar_dragspeed)

    fl_Velocity[0] = (idOrigin[0] - vicOrigin[0]) / fl_Time
    fl_Velocity[1] = (idOrigin[1] - vicOrigin[1]) / fl_Time
    fl_Velocity[2] = (idOrigin[2] - vicOrigin[2]) / fl_Time
    } else {
    fl_Velocity[0] = 0.0
    fl_Velocity[1] = 0.0
    fl_Velocity[2] = 0.0
    }

    entity_set_vector(victim, EV_VEC_velocity, fl_Velocity)
    }

    public drag_end(id)
    {
    g_hooked[id] = 0
    beam_remove(id)
    remove_task(id)

    if (g_drag_i[id])
    g_lastHook[id] = get_gametime()

    g_drag_i[id] = false
    g_unable2move[id] = false
    }

    public fw_TakeDamage(victim, inflictor, attacker, Float:damage)
    {
    if (is_user_alive(attacker) && (get_pcvar_num(cvar_dmgtostop) > 0))
    {
    g_over_dmg[victim] = g_over_dmg[victim] + floatround(damage)
    if (g_over_dmg[victim] >= get_pcvar_num(cvar_dmgtostop))
    {
    g_over_dmg[victim] = 0
    drag_end(victim)
    return HAM_IGNORED;
    }
    }

    return HAM_IGNORED;
    }

    public fw_PlayerPreThink(id)
    {
    if (!is_user_alive(id))
    return FMRES_IGNORED

    new button = get_user_button(id)
    new oldbutton = get_user_oldbutton(id)

    if (zp_get_user_zombie(id) && g_has_drag[id])
    {
    if(g_bind_use[id])
    {
    if (!(oldbutton & IN_USE) && (button & IN_USE))
    drag_start(id)

    if ((oldbutton & IN_USE) && !(button & IN_USE))
    drag_end(id)
    }
    }

    if (!g_drag_i[id])
    g_unable2move[id] = false

    if (g_unable2move[id] && get_pcvar_num(cvar_unb2move) > 0)
    set_pev(id, pev_maxspeed, 1.0)

    return PLUGIN_CONTINUE
    }

    public harpoon_target(parm[])
    {
    new id = parm[0]
    new hooktarget = parm[1]

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(8)
    write_short(id)
    write_short(hooktarget)
    write_short(g_Line)
    write_byte(0)
    write_byte(0)
    write_byte(200)
    write_byte(8)
    write_byte(1)
    write_byte(255)
    write_byte(0)
    write_byte(0)
    write_byte(90)
    write_byte(10)
    message_end()
    }

    public bind_v_key(id, keys)
    {
    g_bind_or_not[id] = true
    switch(keys)
    {
    case 0:
    client_cmd(id, "bind v ^"+drag^"")

    case 1:
    client_print(id, print_chat, "[ZP] To drag player to youself (bind ^'^'key^'^' ^'^'+drag^'^') hold binded key")

    case 2:
    g_bind_use[id] = true

    default:
    g_bind_or_not[id] = false
    }

    return PLUGIN_HANDLED
    }

    public noTarget(id)
    {
    new endorigin[3]

    get_user_origin(id, endorigin, 3)

    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte( TE_BEAMENTPOINT );
    write_short(id)
    write_coord(endorigin[0])
    write_coord(endorigin[1])
    write_coord(endorigin[2])
    write_short(g_Line)
    write_byte(0)
    write_byte(0)
    write_byte(200)
    write_byte(8)
    write_byte(1)
    write_byte(255)
    write_byte(0)
    write_byte(0)
    write_byte(75)
    write_byte(0)
    message_end()
    }

    public beam_remove(id)
    {
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(99)
    write_short(id)
    message_end()
    }

    Mano nao era esse mais com essa sma ai consegui arrumar o meu Vlw mesmo cara
    Luankc
    Luankc
    Administrador


    Masculino Número de Mensagens : 3340
    Ammo Packs : 7212
    Honra : 143
    Data de inscrição : 21/02/2011

    Drag Bugado Empty Re: Drag Bugado

    Mensagem por Luankc 3/2/2012, 6:18 pm

    Opa beleza então ;D

    Resolvido
    -Closed

    Conteúdo patrocinado


    Drag Bugado Empty Re: Drag Bugado

    Mensagem por Conteúdo patrocinado


      Data/hora atual: 23/11/2024, 10:38 am