Zplague Conectar-se

Seu portal de Zombie Plague no Brasil


Compartilhe

description[Pedido] HUD Info Zp 5.0

more_horiz
Junin malz ae te cobrar mas se falo que iria fazer kkk,

um tutorial com as funções basicas do HUD para Zp 5.0

Vida
Colete
Classe
Modo
Velocidade
Ammo Packs


Funções basicas mesmo

____________________________________________






descriptionRe: [Pedido] HUD Info Zp 5.0

more_horiz
eu q peço desculpas
meu primo tomou meu tempo no pc sabado e domingo

e dia de semana tenho aulas e tenho curso de programação, de tarde quando eu voltar eu vou ver ja faço.

____________________________________________

https://twitter.com/junin_md

descriptionRe: [Pedido] HUD Info Zp 5.0

more_horiz
Junin escreveu:
eu q peço desculpas
meu primo tomou meu tempo no pc sabado e domingo

e dia de semana tenho aulas e tenho curso de programação, de tarde quando eu voltar eu vou ver ja faço.


Legal. =) De qual linguagem de programação?

____________________________________________

To be continued...
Fiquei sem internet
Olá VIVO
Saiba postar suas dúvidas!

descriptionRe: [Pedido] HUD Info Zp 5.0

more_horiz
tbm querooo

____________________________________________





BANCO+REGISTRO PERSONALIZADO   CLICK AQUI !!! :


VENDO BANCO+SISTEMA DE REGISTRO+BKADMIN -- TOTALMENTE SEM BUGS >>> PREÇO A COMBINAR
POSSUI SONS,ARQUIVO CFG, SALVA POR NFVAULT
ADD SKYPE SE TIVER INTERESSADO ( dougprado13 ) 
Não Disponibilizo de graça, adc pra pedir eu deleto e denuncio.




Ela é amiga da minha mulher, pois é, pois é, mais vive dando em cima de mim, enfim, enfim (8)

descriptionRe: [Pedido] HUD Info Zp 5.0

more_horiz
Ai esta:

Código:

/*================================================================================
   
    ----------------------------
    -*- [ZP] HUD Information -*-
    ----------------------------
   
    This plugin is part of Zombie Plague Mod and is distributed under the
    terms of the GNU General Public License. Check ZP_ReadMe.txt for details.
   
================================================================================*/

#include <amxmodx>
#include < fun >
#include <cstrike>
#include <fakemeta>
#include <zp50_class_human>
#include <zp50_class_zombie>
#define LIBRARY_NEMESIS "zp50_class_nemesis"
#include <zp50_class_nemesis>
#define LIBRARY_SURVIVOR "zp50_class_survivor"
#include <zp50_class_survivor>
#define LIBRARY_AMMOPACKS "zp50_ammopacks"
#include <zp50_ammopacks>
#include <zp50_gamemodes>

//#include <zp50_class_assassin>
//#include <zp50_class_sniper>
//#include <zp50_class_galinha>
//#include <zp50_class_padre>

new tag[33]
const Float:HUD_SPECT_X = 0.78
const Float:HUD_SPECT_Y = 0.18
const Float:HUD_STATS_X = 0.78
const Float:HUD_STATS_Y = 0.18

const HUD_STATS_ZOMBIE_R = 200
const HUD_STATS_ZOMBIE_G = 250
const HUD_STATS_ZOMBIE_B = 0

const HUD_STATS_HUMAN_R = 0
const HUD_STATS_HUMAN_G = 200
const HUD_STATS_HUMAN_B = 250

const HUD_STATS_SPEC_R = 255
const HUD_STATS_SPEC_G = 255
const HUD_STATS_SPEC_B = 255

#define TASK_SHOWHUD 100
#define ID_SHOWHUD (taskid - TASK_SHOWHUD)

const PEV_SPEC_TARGET = pev_iuser2

new g_MsgSync
//########################
new g_GameModeSurvivorID
new g_GameModeNemesisID
new g_GameModePlagueID
new g_GameModeSwarmID
new g_GameModeInfectionID
new g_GameModeMultiID
new g_GameModeArmageddonID

/*new g_GameModeSniperID
new g_GameModeAssasinID
new g_GameModeGalinhaID
new g_GameModePadreID
new g_GameMode2012ID*/

//########################

public plugin_init()
{
    register_plugin("[ZP] HUD Information", ZP_VERSION_STRING, "ZP Dev Team")
   
    g_MsgSync = CreateHudSyncObj()

    g_GameModeSurvivorID = zp_gamemodes_get_id("Survivor Mode")
    g_GameModeNemesisID = zp_gamemodes_get_id("Nemesis Mode")
    g_GameModePlagueID = zp_gamemodes_get_id("Plague Mode")
    g_GameModeSwarmID = zp_gamemodes_get_id("Swarm Mode")   
    g_GameModeInfectionID = zp_gamemodes_get_id("Infection Mode")
    g_GameModeMultiID = zp_gamemodes_get_id("Multiple Infection Mode")   
    g_GameModeArmageddonID = zp_gamemodes_get_id("Armageddon Mode")   

    /*g_GameModeSniperID = zp_gamemodes_get_id("Sniper Mode")   
    g_GameModeAssasinID = zp_gamemodes_get_id("Assasin Mode")
    g_GameModeGalinhaID = zp_gamemodes_get_id("Galinha Mode")
    g_GameModePadreID = zp_gamemodes_get_id("Padre Mode")
    g_GameMode2012ID = zp_gamemodes_get_id("2012 Mode")*/

    register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
}

public plugin_natives()
{
    set_module_filter("module_filter")
    set_native_filter("native_filter")
}
public module_filter(const module[])
{
    if (equal(module, LIBRARY_NEMESIS) || equal(module, LIBRARY_SURVIVOR) || equal(module, LIBRARY_AMMOPACKS))
        return PLUGIN_HANDLED;
   
    return PLUGIN_CONTINUE;
}
public native_filter(const name[], index, trap)
{
    if (!trap)
        return PLUGIN_HANDLED;
   
    return PLUGIN_CONTINUE;
}

public event_RoundStart()
{
    // Update var (no mode started / in delay)
    tag = "Atualizando..."
}

public client_putinserver(id)
{
    if (!is_user_bot(id))
    {
        // Set the custom HUD display task
        set_task(1.0, "ShowHUD", id+TASK_SHOWHUD, _, _, "b")
    }
}

public client_disconnect(id)
{
    remove_task(id+TASK_SHOWHUD)
}

public zp_fw_gamemodes_start(id)
{
    new current_mode = zp_gamemodes_get_current()

    if (current_mode == g_GameModeNemesisID)
    {
        tag = "Nemesis"
       
        return PLUGIN_HANDLED
    }
    if (current_mode == g_GameModeSurvivorID)
    {
        tag = "Survivor"
       
        return PLUGIN_HANDLED
    }   
    if (current_mode == g_GameModePlagueID)
    {
        tag = "Plague"
       
        return PLUGIN_HANDLED
    }
    if (current_mode == g_GameModeSwarmID)
    {
        tag = "Swarm"
       
        return PLUGIN_HANDLED
    }   
   
    if (current_mode == g_GameModeInfectionID)
    {
        tag = "Infeccao Normal"
       
        return PLUGIN_HANDLED
    }
    if (current_mode == g_GameModeMultiID)
    {
        tag = "Infeccao Multipla"
       
        return PLUGIN_HANDLED
    }       
    if (current_mode == g_GameModeArmageddonID)
    {
        tag = "Armageddon"
       
        return PLUGIN_HANDLED
    }   
    /*if (current_mode == g_GameModeSniperID)
    {
        tag = "Sniper"
       
        return PLUGIN_HANDLED
    }
    if (current_mode == g_GameModeAssasinID)
    {
        tag = "Assasin"
       
        return PLUGIN_HANDLED
    }
    if (current_mode == g_GameModeGalinhaID)
    {
        tag = "Galinha"
       
        return PLUGIN_HANDLED
    }   
    if (current_mode == g_GameModePadreID)
    {
        tag = "Padre"
       
        return PLUGIN_HANDLED
    }
    if (current_mode == g_GameMode2012ID)
    {
        tag = "2012"
       
        return PLUGIN_HANDLED
    }*/
   
    tag = "Atualizando..."
    return PLUGIN_HANDLED
}
public zp_fw_gamemodes_end()
{
    tag = "Partida Encerrada..."
}

// Show HUD Task
public ShowHUD(taskid)
{
    new player = ID_SHOWHUD
   
    // Player dead?
    if (!is_user_alive(player))
    {
        // Get spectating target
        player = pev(player, PEV_SPEC_TARGET)
       
        // Target not alive
        if (!is_user_alive(player))
            return;
    }
   
    // Format classname
    static class_name[32], transkey[64]
    new red, green, blue
   
    if (zp_core_is_zombie(player)) // zombies
    {
        red = HUD_STATS_ZOMBIE_R
        green = HUD_STATS_ZOMBIE_G
        blue = HUD_STATS_ZOMBIE_B
       
        // Nemesis Class loaded?
        if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_nemesis_get(player))
            formatex(class_name, charsmax(class_name), "%L", ID_SHOWHUD, "CLASS_NEMESIS")
        //else if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_assassin_get(player))
        //    formatex(class_name, charsmax(class_name), "Assasino")

        else
        {
            zp_class_zombie_get_name(zp_class_zombie_get_current(player), class_name, charsmax(class_name))
           
            // ML support for class name
            formatex(transkey, charsmax(transkey), "ZOMBIENAME %s", class_name)
            if (GetLangTransKey(transkey) != TransKey_Bad) formatex(class_name, charsmax(class_name), "%L", ID_SHOWHUD, transkey)
        }
    }
    else // humans
    {
        red = HUD_STATS_HUMAN_R
        green = HUD_STATS_HUMAN_G
        blue = HUD_STATS_HUMAN_B
       
        // Survivor Class loaded?
        if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_survivor_get(player))
            formatex(class_name, charsmax(class_name), "%L", ID_SHOWHUD, "CLASS_SURVIVOR")
        /*else if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_sniper_get(player))
            formatex(class_name, charsmax(class_name), "Sniper")
        else if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_padre_get(player))
            formatex(class_name, charsmax(class_name), "Padre")       
        else if (LibraryExists(LIBRARY_NEMESIS, LibType_Library) && zp_class_galinha_get(player))
            formatex(class_name, charsmax(class_name), "Galinha")*/

        else
        {
            zp_class_human_get_name(zp_class_human_get_current(player), class_name, charsmax(class_name))
           
            // ML support for class name
            formatex(transkey, charsmax(transkey), "HUMANNAME %s", class_name)
            if (GetLangTransKey(transkey) != TransKey_Bad) formatex(class_name, charsmax(class_name), "%L", ID_SHOWHUD, transkey)
        }
    }
   
    // Spectating someone else?
    if (player != ID_SHOWHUD)
    {
        new player_name[32]
        get_user_name(player, player_name, charsmax(player_name))
       
        // Show name, health, class, and money
        set_hudmessage(HUD_STATS_SPEC_R, HUD_STATS_SPEC_G, HUD_STATS_SPEC_B, HUD_SPECT_X, HUD_SPECT_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
       
        if (LibraryExists(LIBRARY_AMMOPACKS, LibType_Library))
            ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "%L: %s ^n^n [ %L %s ]^n[ %L %d ]^n[ Vida: %d ]^n[ Colete: %d ]^n[ Frags: %d ]^n[ Mortes: %d ]^n^n[ Modo Atual: %s ]", ID_SHOWHUD, "SPECTATING", player_name, ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(ID_SHOWHUD), get_user_health(ID_SHOWHUD), get_user_armor(player), get_user_frags(player), get_user_deaths(player), tag);
        else
            ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "%L: %s ^n^n [ %L %s ]^n[ %L $ %d ]^n[ Vida: %d ]^n[ Colete: %d ]^n[ Frags: %d ]^n[ Mortes: %d ]^n^n[ Modo Atual: %s ]", ID_SHOWHUD, "SPECTATING", player_name, ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "MONEY1", cs_get_user_money(player), get_user_health(ID_SHOWHUD), get_user_armor(player), get_user_frags(player), get_user_deaths(player), tag);
    }
    else
    {
        // Show health, class
        set_hudmessage(red, green, blue, HUD_STATS_X, HUD_STATS_Y, 0, 6.0, 1.1, 0.0, 0.0, -1)
       
        if (LibraryExists(LIBRARY_AMMOPACKS, LibType_Library))
            ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "[ %L %s ]^n[ %L %d ]^n[ Vida: %d ]^n[ Colete: %d ]^n^n[ Modo: %s ]", ID_SHOWHUD, "CLASS_CLASS", class_name, ID_SHOWHUD, "AMMO_PACKS1", zp_ammopacks_get(ID_SHOWHUD), get_user_health(ID_SHOWHUD), get_user_armor(player), tag);
        else
            ShowSyncHudMsg(ID_SHOWHUD, g_MsgSync, "[ %L %s ]^n[ Vida: %d ]^n[ Colete: %d ]^n^n[ Modo: %s ]", ID_SHOWHUD, "CLASS_CLASS", class_name, get_user_health(ID_SHOWHUD), get_user_armor(player), get_user_frags(player), get_user_deaths(player), tag);
    }
}

descriptionRe: [Pedido] HUD Info Zp 5.0

more_horiz
Vo testa ....
Se funfa + rep !!!

____________________________________________





BANCO+REGISTRO PERSONALIZADO   CLICK AQUI !!! :


VENDO BANCO+SISTEMA DE REGISTRO+BKADMIN -- TOTALMENTE SEM BUGS >>> PREÇO A COMBINAR
POSSUI SONS,ARQUIVO CFG, SALVA POR NFVAULT
ADD SKYPE SE TIVER INTERESSADO ( dougprado13 ) 
Não Disponibilizo de graça, adc pra pedir eu deleto e denuncio.




Ela é amiga da minha mulher, pois é, pois é, mais vive dando em cima de mim, enfim, enfim (8)

descriptionRe: [Pedido] HUD Info Zp 5.0

more_horiz
pegoo so que quando vc fica de spec e vai ve os outros players o hud deles ta com a life bugada fica so em 1

____________________________________________

Ajudei REP+

descriptionRe: [Pedido] HUD Info Zp 5.0

more_horiz
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum