[PEDIDO] Classe Bunshe Somente para VIPS 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


5 participantes

    [PEDIDO] Classe Bunshe Somente para VIPS

    gaah101
    gaah101
    Humano


    Nick : SUB-ZERO=)
    Masculino Número de Mensagens : 86
    A vida nao é facil mais se eu fosse scripter do mundo tornaria mais facil
    Ammo Packs : 4575
    Honra : 4
    Data de inscrição : 24/05/2012

    [PEDIDO] Classe Bunshe Somente para VIPS Empty [PEDIDO] Classe Bunshe Somente para VIPS

    Mensagem por gaah101 28/10/2013, 4:44 am

    Olá gostaria que alguem  coloca-se a clase Bunshe (solta Morcegos) somenta para vips tipo queria ela com 5000 de hp um pouquinho á mais de  gravidade  e se der colocar pra nascer com furia tipo a witch ....  e no menu escolher classe aparcer que e so pra vip.....


    DONWLOAD AKI
    [D]etonado[R]
    [D]etonado[R]
    Humano


    Nick : [D]etonado[R]
    Masculino Número de Mensagens : 625
    Ammo Packs : 4244
    Honra : 20
    Data de inscrição : 17/10/2013

    [PEDIDO] Classe Bunshe Somente para VIPS Empty Re: [PEDIDO] Classe Bunshe Somente para VIPS

    Mensagem por [D]etonado[R] 28/10/2013, 6:46 pm

    Arréa errada.
    Luankc
    Luankc
    Administrador


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

    [PEDIDO] Classe Bunshe Somente para VIPS Empty Re: [PEDIDO] Classe Bunshe Somente para VIPS

    Mensagem por Luankc 28/10/2013, 6:53 pm

    Movido

    gaah101

    Dúvida/Ajuda em scripting, postar nessa área:
    https://zplague.forumeiro.com/f77-duvidas

    Zplague12 
    MasterUnltd
    MasterUnltd
    Humano


    Nick : TheTNT ^
    Masculino Número de Mensagens : 36
    Ammo Packs : 4022
    Honra : -2
    Data de inscrição : 05/12/2013

    [PEDIDO] Classe Bunshe Somente para VIPS Empty Re: [PEDIDO] Classe Bunshe Somente para VIPS

    Mensagem por MasterUnltd 28/12/2013, 11:11 am

    Tentei adicionar pra ganhar furia aqui, ve se funcionou ai.

    Código:
    #include <amxmodx>
    #include <fakemeta>
    #include <amxmisc>
    #include <hamsandwich>
    #include <zombieplague>
    #include < xs >

    #define PLUGIN "[ZP] Zombie Banchee com Furia"
    #define VERSION "1.0"
    #define AUTHOR "Csoldjb / TheTNT"

    new const zclass_name[] = "Zombie Banshee"
    new const zclass_info[] = "Morcegos '\yG\w' / Furia"
    new const zclass_model[] = "zclass_banshe"
    new const zclass_clawmodel[] = "v_knife_banshes.mdl"
    const zclass_health = 5000
    const zclass_speed = 190
    const Float:zclass_gravity = 0.8
    const Float:zclass_knockback = 1.0

    new const SOUND_FIRE[] = "zombie_plague/zombi_banshee_pulling_fire.wav"
    new const SOUND_BAT_HIT[] = "zombie_plague/zombi_banshee_laugh.wav"
    new const SOUND_BAT_MISS[] = "zombie_plague/zombi_banshee_pulling_fail.wav"
    new const MODEL_BAT[] = "models/zombie_plague/bat_witch.mdl"
    new const BAT_CLASSNAME[] = "banchee_bat"
    new spr_skull

    const Float:banchee_skull_bat_speed = 600.0
    const Float:banchee_skull_bat_flytime = 3.0
    const Float:banchee_skull_bat_catch_time = 3.0
    const Float:banchee_skull_bat_catch_speed = 100.0
    const Float:bat_timewait = 30.0

    new g_stop[33]
    new g_bat_time[33]
    new g_bat_stat[33]
    new g_bat_enemy[33]
    new Float:g_temp_speed[33]

    new idclass_banchee
    new g_maxplayers
    new g_roundend
    new g_msgSayText

    enum (+= 100)
    {
       TASK_BOT_USE_SKILL = 2367,
       TASK_REMOVE_STAT
    }

    #define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)
    #define ID_TASK_REMOVE_STAT (taskid - TASK_REMOVE_STAT)

    public plugin_precache()
    {
       precache_sound(SOUND_FIRE)
       precache_sound(SOUND_BAT_HIT)
       precache_sound(SOUND_BAT_MISS)
       
       precache_model(MODEL_BAT)
       
       spr_skull = precache_model("sprites/ef_bat.spr")
       
       idclass_banchee = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
    }

    public plugin_init()
    {
       register_plugin(PLUGIN, VERSION, AUTHOR)
       
       register_event("HLTV", "EventHLTV", "a", "1=0", "2=0")
       register_event("DeathMsg", "EventDeath", "a")
       register_logevent("logevent_round_end", 2, "1=Round_End")
       
       register_clcmd("drop", "cmd_bat")
       
       register_forward(FM_PlayerPreThink,"fw_PlayerPreThink")
       
       RegisterHam(Ham_Touch,"info_target","EntityTouchPost",1)
       RegisterHam(Ham_Think,"info_target","EntityThink")
       
       g_maxplayers = get_maxplayers()
       g_msgSayText = get_user_msgid("SayText")
    }

    public client_putinserver(id)
    {
       reset_value_player(id)
    }

    public client_disconnect(id)
    {
       reset_value_player(id)
    }

    public EventHLTV()
    {
       g_roundend = 0
       
       for(new id = 1; id <= g_maxplayers; id++)
       {
          if (!is_user_connected(id)) continue;
          
          reset_value_player(id)
       }
    }

    public logevent_round_end()
    {
       g_roundend = 1
    }

    public EventDeath()
    {
       new id = read_data(2)
       
       reset_value_player(id)

          zp_force_buy_extra_item(id, 2, 1)
    }

    public zp_user_infected_post(id)
    {
       reset_value_player(id)
       
       if(zp_get_user_nemesis(id)) return;
       
       if(zp_get_user_zombie_class(id) == idclass_banchee)
       {
          if(is_user_bot(id))
          {
             set_task(random_float(5.0,15.0), "bot_use_skill", id+TASK_BOT_USE_SKILL)
             return
          }
          
          zp_colored_print(id, "^x04[ZP]^x01 Voce pode atirar^x03 Morcegos^x01 Precionando ^x04G^x01. Tempo de espera^x04 %.1f ^x01segundos.", bat_timewait)
       }
    }

    public zp_user_humanized_post(id)
    {
       reset_value_player(id)
    }

    public cmd_bat(id)
    {
       if(g_roundend) return PLUGIN_CONTINUE
       
       if(!is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id)) return PLUGIN_CONTINUE
       
       if(zp_get_user_zombie_class(id) == idclass_banchee && !g_bat_time[id])
       {
          g_bat_time[id] = 1
          
          set_task(bat_timewait,"clear_stat",id+TASK_REMOVE_STAT)
          
          new ent = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
          
          if(!pev_valid(ent)) return PLUGIN_HANDLED
          
          new Float:vecAngle[3],Float:vecOrigin[3],Float:vecVelocity[3],Float:vecForward[3]
          fm_get_user_startpos(id,5.0,2.0,-1.0,vecOrigin)
          pev(id,pev_angles,vecAngle)
          
          engfunc(EngFunc_MakeVectors,vecAngle)
          global_get(glb_v_forward,vecForward)
          
          velocity_by_aim(id,floatround(banchee_skull_bat_speed),vecVelocity)
          
          set_pev(ent,pev_origin,vecOrigin)
          set_pev(ent,pev_angles,vecAngle)
          set_pev(ent,pev_classname,BAT_CLASSNAME)
          set_pev(ent,pev_movetype,MOVETYPE_FLY)
          set_pev(ent,pev_solid,SOLID_BBOX)
          engfunc(EngFunc_SetSize,ent,{-20.0,-15.0,-8.0},{20.0,15.0,8.0})
          
          engfunc(EngFunc_SetModel,ent,MODEL_BAT)
          set_pev(ent,pev_animtime,get_gametime())
          set_pev(ent,pev_framerate,1.0)
          set_pev(ent,pev_owner,id)
          set_pev(ent,pev_velocity,vecVelocity)
          set_pev(ent,pev_nextthink,get_gametime()+banchee_skull_bat_flytime)
          emit_sound(ent, CHAN_WEAPON, SOUND_FIRE, 1.0, ATTN_NORM, 0, PITCH_NORM)
          
          g_stop[id] = ent
          
          PlayWeaponAnimation(id, 2)
          pev(id, pev_maxspeed, g_temp_speed[id])
          set_pev(id,pev_maxspeed,0.1)
          
          return PLUGIN_HANDLED
       }
       
       return PLUGIN_CONTINUE
    }

    public fw_PlayerPreThink(id)
    {
       if(!is_user_alive(id)) return FMRES_IGNORED
       
       if(g_bat_stat[id])
       {
          new owner = g_bat_enemy[id], Float:ownerorigin[3]
          pev(owner,pev_origin,ownerorigin)
          static Float:vec[3]
          aim_at_origin(id,ownerorigin,vec)
          engfunc(EngFunc_MakeVectors, vec)
          global_get(glb_v_forward, vec)
          vec[0] *= banchee_skull_bat_catch_speed
          vec[1] *= banchee_skull_bat_catch_speed
          vec[2] = 0.0
          set_pev(id,pev_velocity,vec)
       }
       
       return FMRES_IGNORED
    }

    public EntityThink(ent)
    {
       if(!pev_valid(ent)) return HAM_IGNORED
       
       new classname[32]
       pev(ent,pev_classname,classname,31)
       
       if(equal(classname,BAT_CLASSNAME))
       {
          static Float:origin[3];
          pev(ent,pev_origin,origin);
          
          message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
          write_byte(TE_EXPLOSION); // TE_EXPLOSION
          write_coord(floatround(origin[0])); // origin x
          write_coord(floatround(origin[1])); // origin y
          write_coord(floatround(origin[2])); // origin z
          write_short(spr_skull); // sprites
          write_byte(40); // scale in 0.1's
          write_byte(30); // framerate
          write_byte(14); // flags
          message_end(); // message end
          
          emit_sound(ent, CHAN_WEAPON, SOUND_BAT_MISS, 1.0, ATTN_NORM, 0, PITCH_NORM)
          
          new owner = pev(ent, pev_owner)
          g_stop[owner] = 0
          set_pev(owner,pev_maxspeed,g_temp_speed[owner])
          
          engfunc(EngFunc_RemoveEntity,ent)
       }
       
       return HAM_IGNORED
    }

    public EntityTouchPost(ent,ptd)
    {
       if(!pev_valid(ent)) return HAM_IGNORED
       
       new classname[32]
       pev(ent,pev_classname,classname,31)
       
       if(equal(classname,BAT_CLASSNAME))
       {
          if(!pev_valid(ptd))
          {
             static Float:origin[3];
             pev(ent,pev_origin,origin);
             
             message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
             write_byte(TE_EXPLOSION); // TE_EXPLOSION
             write_coord(floatround(origin[0])); // origin x
             write_coord(floatround(origin[1])); // origin y
             write_coord(floatround(origin[2])); // origin z
             write_short(spr_skull); // sprites
             write_byte(40); // scale in 0.1's
             write_byte(30); // framerate
             write_byte(14); // flags
             message_end(); // message end
             
             emit_sound(ent, CHAN_WEAPON, SOUND_BAT_MISS, 1.0, ATTN_NORM, 0, PITCH_NORM)
             
             new owner = pev(ent, pev_owner)
             g_stop[owner] = 0
             set_pev(owner,pev_maxspeed,g_temp_speed[owner])
             
             engfunc(EngFunc_RemoveEntity,ent)
             
             return HAM_IGNORED
          }
          
          new owner = pev(ent,pev_owner)
          
          if(0 < ptd && ptd <= g_maxplayers && is_user_alive(ptd) && ptd != owner)
          {
             g_bat_enemy[ptd] = owner
             
             set_pev(ent,pev_nextthink,get_gametime()+banchee_skull_bat_catch_time)
             set_task(banchee_skull_bat_catch_time,"clear_stat2",ptd+TASK_REMOVE_STAT)
             set_pev(ent,pev_movetype,MOVETYPE_FOLLOW)
             set_pev(ent,pev_aiment,ptd)
             
             emit_sound(owner, CHAN_VOICE, SOUND_BAT_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM)
             
             g_bat_stat[ptd] = 1
          }
       }
       
       return HAM_IGNORED
    }

    public clear_stat(taskid)
    {
       new id = ID_TASK_REMOVE_STAT
       
       g_bat_stat[id] = 0
       g_bat_time[id] = 0
       
       zp_colored_print(id, "^x04[ZP]^x01 Voce ja pode atirar^x03 Morcegos^x01 Denovo!.")
    }

    public clear_stat2(idx)
    {
       new id = idx-TASK_REMOVE_STAT
       
       g_bat_enemy[id] = 0
       g_bat_stat[id] = 0
    }

    public bot_use_skill(taskid)
    {
       new id = ID_BOT_USE_SKILL
       
       if (!is_user_alive(id)) return;
       
       cmd_bat(id)
       
       set_task(random_float(5.0,15.0), "bot_use_skill", id+TASK_BOT_USE_SKILL)
    }

    fm_get_user_startpos(id,Float:forw,Float:right,Float:up,Float:vStart[])
    {
       new Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
       
       pev(id, pev_origin, vOrigin)
       pev(id, pev_v_angle, vAngle)
       
       engfunc(EngFunc_MakeVectors, vAngle)
       
       global_get(glb_v_forward, vForward)
       global_get(glb_v_right, vRight)
       global_get(glb_v_up, vUp)
       
       vStart[0] = vOrigin[0] + vForward[0] * forw + vRight[0] * right + vUp[0] * up
       vStart[1] = vOrigin[1] + vForward[1] * forw + vRight[1] * right + vUp[1] * up
       vStart[2] = vOrigin[2] + vForward[2] * forw + vRight[2] * right + vUp[2] * up
    }

    aim_at_origin(id, Float:target[3], Float:angles[3])
    {
       static Float:vec[3]
       pev(id,pev_origin,vec)
       vec[0] = target[0] - vec[0]
       vec[1] = target[1] - vec[1]
       vec[2] = target[2] - vec[2]
       engfunc(EngFunc_VecToAngles,vec,angles)
       angles[0] *= -1.0
       angles[2] = 0.0
    }

    PlayWeaponAnimation(id, animation)
    {
       set_pev(id, pev_weaponanim, animation)
       message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, id)
       write_byte(animation)
       write_byte(pev(id, pev_body))
       message_end()
    }

    reset_value_player(id)
    {
       g_stop[id] = 0
       g_bat_time[id] = 0
       g_bat_stat[id] = 0
       g_bat_enemy[id] = 0
       
       remove_task(id+TASK_BOT_USE_SKILL)
       remove_task(id+TASK_REMOVE_STAT)
    }

    zp_colored_print(target, const message[], any:...)
    {
       static buffer[512], i, argscount
       argscount = numargs()
       
       if (!target)
       {
          static player
          for (player = 1; player <= g_maxplayers; player++)
          {
             if (!is_user_connected(player))
                continue;
             
             static changed[5], changedcount
             changedcount = 0
             
             for (i = 2; i < argscount; i++)
             {
                if (getarg(i) == LANG_PLAYER)
                {
                   setarg(i, 0, player)
                   changed[changedcount] = i
                   changedcount++
                }
             }
             
             vformat(buffer, charsmax(buffer), message, 3)
             
             message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
             write_byte(player)
             write_string(buffer)
             message_end()
             
             for (i = 0; i < changedcount; i++)
                setarg(changed[i], 0, LANG_PLAYER)
          }
       }
       else
       {
          vformat(buffer, charsmax(buffer), message, 3)
          
          message_begin(MSG_ONE, g_msgSayText, _, target)
          write_byte(target)
          write_string(buffer)
          message_end()
       }
    }
    [D]etonado[R]
    [D]etonado[R]
    Humano


    Nick : [D]etonado[R]
    Masculino Número de Mensagens : 625
    Ammo Packs : 4244
    Honra : 20
    Data de inscrição : 17/10/2013

    [PEDIDO] Classe Bunshe Somente para VIPS Empty Re: [PEDIDO] Classe Bunshe Somente para VIPS

    Mensagem por [D]etonado[R] 28/12/2013, 1:26 pm

    Vou fazer aqui.
    Soukito
    Soukito
    Humano


    Masculino Número de Mensagens : 236
    Ammo Packs : 4218
    Honra : 10
    Data de inscrição : 28/05/2013

    [PEDIDO] Classe Bunshe Somente para VIPS Empty Re: [PEDIDO] Classe Bunshe Somente para VIPS

    Mensagem por Soukito 28/12/2013, 5:55 pm

    ou detonador coloca um tutorial para todos aprenderem a colocar uma classe zm so para vips como tinha na DH zmXP so vips tinha acesso a classe zumbi jumper
    [D]etonado[R]
    [D]etonado[R]
    Humano


    Nick : [D]etonado[R]
    Masculino Número de Mensagens : 625
    Ammo Packs : 4244
    Honra : 20
    Data de inscrição : 17/10/2013

    [PEDIDO] Classe Bunshe Somente para VIPS Empty Re: [PEDIDO] Classe Bunshe Somente para VIPS

    Mensagem por [D]etonado[R] 28/12/2013, 6:12 pm

    Eu fiz a banshee com furia, já colocar para vip vou ver.

    Código:
    #include <amxmodx>
    #include <fakemeta>
    #include <hamsandwich>
    #include <zombieplague>
    #include < xs >

    new zclass_fury

    #define PLUGIN "DJB Zombie Class Banchee"
    #define VERSION "1.0"
    #define AUTHOR "Csoldjb"

    new const zclass_name[] = "Zombie Banshee"
    new const zclass_info[] = "Solta Morcegos 'G'"
    new const zclass_model[] = "zclass_banshe"
    new const zclass_clawmodel[] = "v_knife_banshes.mdl"
    const zclass_health = 5000
    const zclass_speed = 190
    const Float:zclass_gravity = 0.70
    const Float:zclass_knockback = 1.0

    new const SOUND_FIRE[] = "zombie_plague/zombi_banshee_pulling_fire.wav"
    new const SOUND_BAT_HIT[] = "zombie_plague/zombi_banshee_laugh.wav"
    new const SOUND_BAT_MISS[] = "zombie_plague/zombi_banshee_pulling_fail.wav"
    new const MODEL_BAT[] = "models/zombie_plague/bat_witch.mdl"
    new const BAT_CLASSNAME[] = "banchee_bat"
    new spr_skull

    const Float:banchee_skull_bat_speed = 600.0
    const Float:banchee_skull_bat_flytime = 3.0
    const Float:banchee_skull_bat_catch_time = 3.0
    const Float:banchee_skull_bat_catch_speed = 100.0
    const Float:bat_timewait = 30.0

    new g_stop[33]
    new g_bat_time[33]
    new g_bat_stat[33]
    new g_bat_enemy[33]
    new Float:g_temp_speed[33]

    new idclass_banchee
    new g_maxplayers
    new g_roundend
    new g_msgSayText

    enum (+= 100)
    {
       TASK_BOT_USE_SKILL = 2367,
       TASK_REMOVE_STAT
    }

    #define ID_BOT_USE_SKILL (taskid - TASK_BOT_USE_SKILL)
    #define ID_TASK_REMOVE_STAT (taskid - TASK_REMOVE_STAT)

    public plugin_precache()
    {
       precache_sound(SOUND_FIRE)
       precache_sound(SOUND_BAT_HIT)
       precache_sound(SOUND_BAT_MISS)
       
       precache_model(MODEL_BAT)
       
       spr_skull = precache_model("sprites/ef_bat.spr")
       
       zclass_fury = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
    }

    public plugin_init()
    {
       register_plugin(PLUGIN, VERSION, AUTHOR)
       
       register_event("HLTV", "EventHLTV", "a", "1=0", "2=0")
       register_event("DeathMsg", "EventDeath", "a")
       register_logevent("logevent_round_end", 2, "1=Round_End")
       
       register_clcmd("drop", "cmd_bat")
       
       register_forward(FM_PlayerPreThink,"fw_PlayerPreThink")
       
       RegisterHam(Ham_Touch,"info_target","EntityTouchPost",1)
       RegisterHam(Ham_Think,"info_target","EntityThink")
       
       g_maxplayers = get_maxplayers()
       g_msgSayText = get_user_msgid("SayText")
    }

    public client_putinserver(id)
    {
       reset_value_player(id)
    }

    public client_disconnect(id)
    {
       reset_value_player(id)
    }

    public EventHLTV()
    {
       g_roundend = 0
       
       for(new id = 1; id <= g_maxplayers; id++)
       {
          if (!is_user_connected(id)) continue;
          
          reset_value_player(id)
       }
    }

    public logevent_round_end()
    {
       g_roundend = 1
    }

    public EventDeath()
    {
       new id = read_data(2)
       
       reset_value_player(id)
    }

    public zp_user_infected_post( id, infector )
    {
       reset_value_player(id)
       
       if(zp_get_user_nemesis(id)) return;
       
       if(zp_get_user_zombie_class(id) == zclass_fury)
       {
          if(is_user_bot(id))
          {
             zp_force_buy_extra_item(id, 2, 1)
             set_task(random_float(5.0,15.0), "bot_use_skill", id+TASK_BOT_USE_SKILL)
             return
          }
          
          zp_colored_print(id, "^x04[ZP]^x01 Voce pode atirar^x03 Morcegos^x01 Precionando ^x04G^x01. Tempo de espera^x04 %.1f ^x01segundos.", bat_timewait)
       }
    }

    public zp_user_humanized_post(id)
    {
       reset_value_player(id)
    }

    public cmd_bat(id)
    {
       if(g_roundend) return PLUGIN_CONTINUE
       
       if(!is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_nemesis(id)) return PLUGIN_CONTINUE
       
       if(zp_get_user_zombie_class(id) == idclass_banchee && !g_bat_time[id])
       {
          g_bat_time[id] = 1
          
          set_task(bat_timewait,"clear_stat",id+TASK_REMOVE_STAT)
          
          new ent = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
          
          if(!pev_valid(ent)) return PLUGIN_HANDLED
          
          new Float:vecAngle[3],Float:vecOrigin[3],Float:vecVelocity[3],Float:vecForward[3]
          fm_get_user_startpos(id,5.0,2.0,-1.0,vecOrigin)
          pev(id,pev_angles,vecAngle)
          
          engfunc(EngFunc_MakeVectors,vecAngle)
          global_get(glb_v_forward,vecForward)
          
          velocity_by_aim(id,floatround(banchee_skull_bat_speed),vecVelocity)
          
          set_pev(ent,pev_origin,vecOrigin)
          set_pev(ent,pev_angles,vecAngle)
          set_pev(ent,pev_classname,BAT_CLASSNAME)
          set_pev(ent,pev_movetype,MOVETYPE_FLY)
          set_pev(ent,pev_solid,SOLID_BBOX)
          engfunc(EngFunc_SetSize,ent,{-20.0,-15.0,-8.0},{20.0,15.0,8.0})
          
          engfunc(EngFunc_SetModel,ent,MODEL_BAT)
          set_pev(ent,pev_animtime,get_gametime())
          set_pev(ent,pev_framerate,1.0)
          set_pev(ent,pev_owner,id)
          set_pev(ent,pev_velocity,vecVelocity)
          set_pev(ent,pev_nextthink,get_gametime()+banchee_skull_bat_flytime)
          emit_sound(ent, CHAN_WEAPON, SOUND_FIRE, 1.0, ATTN_NORM, 0, PITCH_NORM)
          
          g_stop[id] = ent
          
          PlayWeaponAnimation(id, 2)
          pev(id, pev_maxspeed, g_temp_speed[id])
          set_pev(id,pev_maxspeed,0.1)
          
          return PLUGIN_HANDLED
       }
       
       return PLUGIN_CONTINUE
    }

    public fw_PlayerPreThink(id)
    {
       if(!is_user_alive(id)) return FMRES_IGNORED
       
       if(g_bat_stat[id])
       {
          new owner = g_bat_enemy[id], Float:ownerorigin[3]
          pev(owner,pev_origin,ownerorigin)
          static Float:vec[3]
          aim_at_origin(id,ownerorigin,vec)
          engfunc(EngFunc_MakeVectors, vec)
          global_get(glb_v_forward, vec)
          vec[0] *= banchee_skull_bat_catch_speed
          vec[1] *= banchee_skull_bat_catch_speed
          vec[2] = 0.0
          set_pev(id,pev_velocity,vec)
       }
       
       return FMRES_IGNORED
    }

    public EntityThink(ent)
    {
       if(!pev_valid(ent)) return HAM_IGNORED
       
       new classname[32]
       pev(ent,pev_classname,classname,31)
       
       if(equal(classname,BAT_CLASSNAME))
       {
          static Float:origin[3];
          pev(ent,pev_origin,origin);
          
          message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
          write_byte(TE_EXPLOSION); // TE_EXPLOSION
          write_coord(floatround(origin[0])); // origin x
          write_coord(floatround(origin[1])); // origin y
          write_coord(floatround(origin[2])); // origin z
          write_short(spr_skull); // sprites
          write_byte(40); // scale in 0.1's
          write_byte(30); // framerate
          write_byte(14); // flags
          message_end(); // message end
          
          emit_sound(ent, CHAN_WEAPON, SOUND_BAT_MISS, 1.0, ATTN_NORM, 0, PITCH_NORM)
          
          new owner = pev(ent, pev_owner)
          g_stop[owner] = 0
          set_pev(owner,pev_maxspeed,g_temp_speed[owner])
          
          engfunc(EngFunc_RemoveEntity,ent)
       }
       
       return HAM_IGNORED
    }

    public EntityTouchPost(ent,ptd)
    {
       if(!pev_valid(ent)) return HAM_IGNORED
       
       new classname[32]
       pev(ent,pev_classname,classname,31)
       
       if(equal(classname,BAT_CLASSNAME))
       {
          if(!pev_valid(ptd))
          {
             static Float:origin[3];
             pev(ent,pev_origin,origin);
             
             message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
             write_byte(TE_EXPLOSION); // TE_EXPLOSION
             write_coord(floatround(origin[0])); // origin x
             write_coord(floatround(origin[1])); // origin y
             write_coord(floatround(origin[2])); // origin z
             write_short(spr_skull); // sprites
             write_byte(40); // scale in 0.1's
             write_byte(30); // framerate
             write_byte(14); // flags
             message_end(); // message end
             
             emit_sound(ent, CHAN_WEAPON, SOUND_BAT_MISS, 1.0, ATTN_NORM, 0, PITCH_NORM)
             
             new owner = pev(ent, pev_owner)
             g_stop[owner] = 0
             set_pev(owner,pev_maxspeed,g_temp_speed[owner])
             
             engfunc(EngFunc_RemoveEntity,ent)
             
             return HAM_IGNORED
          }
          
          new owner = pev(ent,pev_owner)
          
          if(0 < ptd && ptd <= g_maxplayers && is_user_alive(ptd) && ptd != owner)
          {
             g_bat_enemy[ptd] = owner
             
             set_pev(ent,pev_nextthink,get_gametime()+banchee_skull_bat_catch_time)
             set_task(banchee_skull_bat_catch_time,"clear_stat2",ptd+TASK_REMOVE_STAT)
             set_pev(ent,pev_movetype,MOVETYPE_FOLLOW)
             set_pev(ent,pev_aiment,ptd)
             
             emit_sound(owner, CHAN_VOICE, SOUND_BAT_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM)
             
             g_bat_stat[ptd] = 1
          }
       }
       
       return HAM_IGNORED
    }

    public clear_stat(taskid)
    {
       new id = ID_TASK_REMOVE_STAT
       
       g_bat_stat[id] = 0
       g_bat_time[id] = 0
       
       zp_colored_print(id, "^x04[ZP]^x01 Voce ja pode atirar^x03 Morcegos^x01 Denovo!.")
    }

    public clear_stat2(idx)
    {
       new id = idx-TASK_REMOVE_STAT
       
       g_bat_enemy[id] = 0
       g_bat_stat[id] = 0
    }

    public bot_use_skill(taskid)
    {
       new id = ID_BOT_USE_SKILL
       
       if (!is_user_alive(id)) return;
       
       cmd_bat(id)
       
       set_task(random_float(5.0,15.0), "bot_use_skill", id+TASK_BOT_USE_SKILL)
    }

    fm_get_user_startpos(id,Float:forw,Float:right,Float:up,Float:vStart[])
    {
       new Float:vOrigin[3], Float:vAngle[3], Float:vForward[3], Float:vRight[3], Float:vUp[3]
       
       pev(id, pev_origin, vOrigin)
       pev(id, pev_v_angle, vAngle)
       
       engfunc(EngFunc_MakeVectors, vAngle)
       
       global_get(glb_v_forward, vForward)
       global_get(glb_v_right, vRight)
       global_get(glb_v_up, vUp)
       
       vStart[0] = vOrigin[0] + vForward[0] * forw + vRight[0] * right + vUp[0] * up
       vStart[1] = vOrigin[1] + vForward[1] * forw + vRight[1] * right + vUp[1] * up
       vStart[2] = vOrigin[2] + vForward[2] * forw + vRight[2] * right + vUp[2] * up
    }

    aim_at_origin(id, Float:target[3], Float:angles[3])
    {
       static Float:vec[3]
       pev(id,pev_origin,vec)
       vec[0] = target[0] - vec[0]
       vec[1] = target[1] - vec[1]
       vec[2] = target[2] - vec[2]
       engfunc(EngFunc_VecToAngles,vec,angles)
       angles[0] *= -1.0
       angles[2] = 0.0
    }

    PlayWeaponAnimation(id, animation)
    {
       set_pev(id, pev_weaponanim, animation)
       message_begin(MSG_ONE, SVC_WEAPONANIM, {0, 0, 0}, id)
       write_byte(animation)
       write_byte(pev(id, pev_body))
       message_end()
    }

    reset_value_player(id)
    {
       g_stop[id] = 0
       g_bat_time[id] = 0
       g_bat_stat[id] = 0
       g_bat_enemy[id] = 0
       
       remove_task(id+TASK_BOT_USE_SKILL)
       remove_task(id+TASK_REMOVE_STAT)
    }

    zp_colored_print(target, const message[], any:...)
    {
       static buffer[512], i, argscount
       argscount = numargs()
       
       if (!target)
       {
          static player
          for (player = 1; player <= g_maxplayers; player++)
          {
             if (!is_user_connected(player))
                continue;
             
             static changed[5], changedcount
             changedcount = 0
             
             for (i = 2; i < argscount; i++)
             {
                if (getarg(i) == LANG_PLAYER)
                {
                   setarg(i, 0, player)
                   changed[changedcount] = i
                   changedcount++
                }
             }
             
             vformat(buffer, charsmax(buffer), message, 3)
             
             message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
             write_byte(player)
             write_string(buffer)
             message_end()
             
             for (i = 0; i < changedcount; i++)
                setarg(changed[i], 0, LANG_PLAYER)
          }
       }
       else
       {
          vformat(buffer, charsmax(buffer), message, 3)
          
          message_begin(MSG_ONE, g_msgSayText, _, target)
          write_byte(target)
          write_string(buffer)
          message_end()
       }
    }



    Conteúdo patrocinado


    [PEDIDO] Classe Bunshe Somente para VIPS Empty Re: [PEDIDO] Classe Bunshe Somente para VIPS

    Mensagem por Conteúdo patrocinado


      Data/hora atual: 23/11/2024, 5:47 am