Zombie Swarm 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

    Zombie Swarm

    romulonp
    romulonp
    Humano


    Nick : Dii-Menor
    Masculino Número de Mensagens : 223
    Ammo Packs : 4578
    Honra : 0
    Data de inscrição : 19/04/2012

    Zombie Swarm Empty Zombie Swarm

    Mensagem por romulonp 16/4/2013, 7:49 pm

    o Perfect Scrash tinha me pedido o zombie swarm , eu achei esse aqui no forum mesmo o Vini que posto
    veja se funciona
    Código:
    #include <amxmodx>
    #include <cstrike>
    #include <fakemeta>
    #include <hamsandwich>
    #include <zombieplague>

    #define PLUGIN "[ZP] Class : Assassin Zombie"
    #define VERSION "1.0"
    #define AUTHOR "F"

    new const zclass_name[] = "Assassin Zombie"
    new const zclass_info[] = "HP+++ Speed++ Knockback++"
    new const zclass_model[] = "zombie_source"
    new const zclass_clawmodel[] = "v_knife_zombie.mdl"
    const zclass_health = 2430
    const zclass_speed = 220
    const Float:zclass_gravity = 1.0
    const Float:zclass_knockback = 1.55

    new g_msgScoreAttrib
    new g_zclass_assassin

    public plugin_init()
    {
        register_plugin(PLUGIN, VERSION, AUTHOR)
       
        register_cvar("zp_zclass_assassin_zombie",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
       
        g_msgScoreAttrib = get_user_msgid("ScoreAttrib")
       
        RegisterHam(Ham_TakeDamage, "player", "fw_PlayerTakeDamage")
    }

    public plugin_precache()
    {
        g_zclass_assassin = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
    }

    public zp_user_infected_post(player, infector)
    {
        if (zp_get_user_zombie_class(player) == g_zclass_assassin)
        {
            client_print(player, print_chat, "[ZP] You are now Assassin Zombie")
            client_print(player, print_chat, "[ZP] You can chose between infect and kill people")
        }
    }

    public zp_user_infect_attempt(victim, infector, nemesis)
    {
        if (zp_get_user_zombie_class(infector) == g_zclass_assassin)
        {
            new button = pev(infector, pev_button)
           
            if (button & IN_ATTACK2)
            {
                ExecuteHamB(Ham_Killed, victim, infector, 0)
            }
            else
                return PLUGIN_CONTINUE
           
            return ZP_PLUGIN_HANDLED
        }
       
        return PLUGIN_CONTINUE
    }

    public fw_PlayerTakeDamage(id, inflictor, attacker, Float:damage, damage_type)
    {
        if (!is_user_alive(id) || !is_user_bot(id) || !zp_get_user_zombie(id))
            return HAM_IGNORED
       
        if (zp_get_user_zombie_class(id) != g_zclass_assassin)
            return HAM_IGNORED

        new attacker_name[32]
        new button = pev(attacker, pev_button)
        new GetMaxPlayers = get_maxplayers()
        new GetHumanCount = zp_get_human_count()
       
        get_user_name(attacker, attacker_name, 31)
       
        if (!zp_is_swarm_round() || !zp_is_plague_round() || !zp_is_survivor_round() || !zp_is_nemesis_round() || GetHumanCount == GetMaxPlayers)
        {
            if (button & IN_ATTACK2)
            {   
                if (zp_get_user_zombie_class(attacker) == g_zclass_assassin)
                {
                    FixDeadAttrib(id)
                    UpdateScoreBoard(id, attacker)
                    client_print(id, print_chat, "[ZP] Hmm looks like %s didn't like you and decided to kill You!", attacker_name)
               
                    return HAM_SUPERCEDE
                }
            }
        }
           
        return HAM_SUPERCEDE
    }
       
    public FixDeadAttrib(id)
    {
        message_begin(MSG_BROADCAST, g_msgScoreAttrib)
        write_byte(id)
        write_byte(DEAD_DYING)
        message_end()
    }
    [P]erfec[T] [S]cr[@]s[H]
    [P]erfec[T] [S]cr[@]s[H]
    Scripter


    Masculino Número de Mensagens : 564
    Jogador FODA Perfect Scrash entrou na zplague
    Ammo Packs : 4545
    Honra : 177
    Data de inscrição : 04/04/2013

    Zombie Swarm Empty Re: Zombie Swarm

    Mensagem por [P]erfec[T] [S]cr[@]s[H] 16/4/2013, 7:51 pm

    Esse ai é o zombie assassino mas de qualquer forma valeu ai.

    @edit Agora não tem mais necessidade acabei achando um aqui daquele que eu queria.

    Aqui a sma:
    Código:
    #include <amxmodx>
    #include <engine>
    #include <hamsandwich>
    #include <zombieplague>

    /*================================================================================
     [Customizations]
    =================================================================================*/

    // Zombie Attributes
    new const zclass_name[] = "Zumbi Swarm" // name
    new const zclass_info[] = "\r[Mata e nao infecta]" // description
    new const zclass_model[] = "perfect_zombie_swarm" // model
    new const zclass_clawmodel[] = "v_swarm_perfect.mdl" // claw model

    const zclass_health = 2000 // health
    const zclass_speed = 230 // speed

    const Float:zclass_gravity = 0.85 // gravity
    const Float:zclass_knockback = 0.0 // knockback

    /*================================================================================
     Customization ends here! Yes, that's it. Editing anything beyond
     here is not officially supported. Proceed at your own risk...
    =================================================================================*/

    // Variables
    new g_iSwarmZID, g_iMaxPlayers, g_msgSayText

    // Cvar pointers
    new cvar_dmgmult, cvar_surv_dmgmult, cvar_blockinfbomb_infect

    // Cached cvars
    new bool:g_bCvar_Infbomb_Infect, Float:g_flCvar_DmgMult, Float:g_flCvar_SurvDmgMult

    // Bools
    new bool:g_bIsConnected[33], bool:g_bRoundEnding

    // Offsets
    const m_pPlayer = 41

    // A const
    const NADE_TYPE_INFECTION = 1111 // from main ZP plugin

    // Plug info.
    #define PLUG_VERSION "0.7"
    #define PLUG_AUTH "meTaLiCroSS"

    // Macros
    #define zp_get_grenade_type(%1)        (entity_get_int(%1, EV_INT_flTimeStepSound))
    #define is_user_valid_connected(%1)    (1 <= %1 <= g_iMaxPlayers && g_bIsConnected[%1])

    /*================================================================================
     [Init, CFG and Precache]
    =================================================================================*/

    public plugin_init()
    {
        // Plugin Register
        register_plugin("[ZP] Zombie Class: Swarm Zombie", PLUG_VERSION, PLUG_AUTH)
           
        // Main events
        register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
       
        // Hamsandwich Forwards
        RegisterHam(Ham_Weapon_PrimaryAttack, "weapon_knife", "fw_KnifeAttack")
        RegisterHam(Ham_Weapon_SecondaryAttack, "weapon_knife", "fw_KnifeAttack")
       
        // Cvars
        cvar_dmgmult = register_cvar("zp_swarm_damage_mult", "2.0")
        cvar_surv_dmgmult = register_cvar("zp_swarm_surv_damage_mult", "3.0")
        cvar_blockinfbomb_infect = register_cvar("zp_swarm_infbomb_infect", "1")
       
        static szCvar[30]
        formatex(szCvar, charsmax(szCvar), "v%s by %s", PLUG_VERSION, PLUG_AUTH)
        register_cvar("zp_zclass_swarm", szCvar, FCVAR_SERVER|FCVAR_SPONLY)
       
        // Vars
        g_iMaxPlayers = get_maxplayers()
        g_msgSayText = get_user_msgid("SayText")
    }

    public plugin_cfg()
    {
        // Do some cvars cache
        cache_cvars()
    }

    public plugin_precache()
    {
        // Hamsandwich Forwards
        RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
       
        // Register the new class and store ID for reference
        g_iSwarmZID = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)   
    }

    /*================================================================================
     [Main Events]
    =================================================================================*/

    public event_RoundStart()
    {
        // Do some cvars cache
        cache_cvars()
       
        // Update bool
        g_bRoundEnding = false
    }

    /*================================================================================
     [Main Forwards]
    =================================================================================*/

    public client_putinserver(id)
    {
        // Updating bool
        g_bIsConnected[id] = true
    }

    public client_disconnect(id)
    {
        // Updating bool
        g_bIsConnected[id] = false
    }

    public fw_KnifeAttack(knife)
    {
        // We need to block the Knife attack, because
        // when has throwed an Infection bomb it can Kill/Infect
        // with Knife, and will be a bug
        // ----
        // Get knife owner (player)
        static iPlayer
        iPlayer = get_pdata_cbase(knife, m_pPlayer, 4)
       
        // Non-player entity
        if(!is_user_valid_connected(iPlayer))
            return HAM_IGNORED
       
        // Swarm zombie class, not a nemesis and has throwed a infection nade
        if(zp_get_user_zombie_class(iPlayer) == g_iSwarmZID && !zp_get_user_nemesis(iPlayer) && zp_get_user_infection_nade(iPlayer) > 0)
            return HAM_SUPERCEDE
       
        return HAM_IGNORED
    }

    public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damagetype)
    {
        // In the Main ZP plugin, the TakeDamage forward is Superceded, so
        // we need to register this in Precache to get it working again
        // ----
        // Non-player attacker, self attack, attacked by world, or isn't make damage by himself
        if(!is_user_valid_connected(attacker) || victim == attacker || !attacker || attacker != inflictor)
            return HAM_IGNORED
           
        // Swarm zombie class
        if(zp_get_user_zombie(attacker) && zp_get_user_zombie_class(attacker) == g_iSwarmZID && !zp_get_user_nemesis(attacker) && !g_bRoundEnding)
        {
            // Get damage result (with survivor and human damage multiplier)
            static Float:flDamageResult
            flDamageResult = damage * (zp_get_user_survivor(victim) ? g_flCvar_SurvDmgMult : g_flCvar_DmgMult)
           
            // Do damage again
            ExecuteHam(Ham_TakeDamage, victim, inflictor, attacker, flDamageResult, damagetype)
           
            // Stop here
            return HAM_SUPERCEDE;
        }
           
        return HAM_IGNORED
    }

    /*================================================================================
     [Zombie Plague Forwards]
    =================================================================================*/

    public zp_user_infect_attempt(victim, infector, nemesis)
    {
        // Non-player infection or turned into a nemesis
        if(!infector || nemesis)   
            return PLUGIN_CONTINUE
           
        // Check Swarm Zombie class and block infection.
        // I'm detecting if is Zombie and isn't Nemesis because
        // can be an infection by zp_infect_user native
        if(zp_get_user_zombie_class(infector) == g_iSwarmZID && zp_get_user_zombie(infector) && !zp_get_user_nemesis(infector))
        {
            // With infection grenade then must kill or infect, defined by cvar.
            if(zp_get_user_infection_nade(infector) > 0)
            {
                switch(g_bCvar_Infbomb_Infect)
                {
                    case true:    return PLUGIN_CONTINUE // Infect
                    case false:    ExecuteHamB(Ham_Killed, victim, infector, 0) // Kill
                }
            }
           
            return ZP_PLUGIN_HANDLED
        }
           
        return PLUGIN_CONTINUE
    }

    public zp_user_infected_post(id, infector, nemesis)
    {
        // It's the selected zombie class
        if(zp_get_user_zombie_class(id) == g_iSwarmZID && !nemesis)
        {
            // My rofl message :D
            client_printcolor(id, "/g[ZP]/y /g%s /yClass by /ctr%s/y", zclass_name, PLUG_AUTH)
        }
    }

    public zp_round_ended(winteam)
    {
        // Update bool
        g_bRoundEnding = true
    }

    /*================================================================================
     [Internal Functions]
    =================================================================================*/

    cache_cvars()
    {
        // Caching cvars
        g_flCvar_DmgMult = get_pcvar_float(cvar_dmgmult)
        g_flCvar_SurvDmgMult = get_pcvar_float(cvar_surv_dmgmult)
        g_bCvar_Infbomb_Infect = bool:get_pcvar_num(cvar_blockinfbomb_infect)
    }

    /*================================================================================
     [Stocks]
    =================================================================================*/

    stock zp_get_user_infection_nade(id)
    {
        static iNade
        iNade = get_grenade(id)
       
        if(iNade > 0 && is_valid_ent(iNade)
        && zp_get_grenade_type(iNade) == NADE_TYPE_INFECTION)   
            return iNade
       
        return 0;
    }

    stock client_printcolor(id, const input[], any:...)
    {
        static iPlayersNum[32], iCount; iCount = 1
        static szMsg[191]
       
        vformat(szMsg, charsmax(szMsg), input, 3)
       
        replace_all(szMsg, 190, "/g", "^4") // green txt
        replace_all(szMsg, 190, "/y", "^1") // orange txt
        replace_all(szMsg, 190, "/ctr", "^3") // team txt
        replace_all(szMsg, 190, "/w", "^0") // team txt
       
        if(id) iPlayersNum[0] = id
        else get_players(iPlayersNum, iCount, "ch")
           
        for (new i = 0; i < iCount; i++)
        {
            if (g_bIsConnected[iPlayersNum[i]])
            {
                message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayersNum[i])
                write_byte(iPlayersNum[i])
                write_string(szMsg)
                message_end()
            }
        }
    }

    OBS: vai ter que mudar a model pra não dar erro.

      Data/hora atual: 23/11/2024, 9:12 am